[UPHPU] JavaScript Question

Tyler Gee geekout at gmail.com
Mon Mar 27 13:52:35 MST 2006


Sorry to jump in a little late here, but are youmeaning to pass the
string -- document.new_user.staff[0] -- because you have it in single
quotes so it won't interpolate.  Or are you meaning to pass in that
element?

~Tyler

On 3/27/06, Brady Mitchell <bradym at ext.usu.edu> wrote:
> > -----Original Message-----
> > What does the rest of your javascript look like? I'd be
> > interested to see
> > what you are passing in to writeError.
>
> View source at http://ut4htech.org/~bradym/js-validation-test.php to see
> all of the code.  The indentation is all weird cause it's being
> generated by PHP and I haven't taken the time to make it look good.  The
> ultimate goal here is to have a PHP function that generates the JS
> function based on an array of values to validate.
>
> For the radio buttons, I've currently got (where staff is what the radio
> buttons are called):
>
>         writeError('document.new_user.staff[0]','Please specify if you
> are staff or not.');
>
> And for checkboxes (where box1 is the first checkbox):
>
>         writeError('document.new_user.box1','Please select at least one
> of the boxes');
>
>
> > The radio button issue sounds like you are passing in a node
> > list rather than an individual button.
>
> This is exactly what I was doing, but I have now changed it to
> document.new_user.staff[0] and it's doing the same thing.  What am I
> missing?
>
> Brady
>
>
> _______________________________________________
>
> UPHPU mailing list
> UPHPU at uphpu.org
> http://uphpu.org/mailman/listinfo/uphpu
> IRC: #uphpu on irc.freenode.net
>



More information about the UPHPU mailing list