[Javascript] Need some help validating a form

James Macdiarmid James.Macdiarmid at cgifederal.com
Fri Apr 20 13:49:22 CDT 2007


Hi Peter  Hi Everyone
 
I've kinda taken a different route to this issue.  I have a different
problem now..  
 
I've created an embedded global array in my javascript code  from a
recordset in ASP.  When the code tries to access this embedded array I
get an undefined error.  I've checked spelling and it looks correct.
Any ideas what might be causing this?
 
Thanks,
Jim

________________________________

From: javascript-bounces at LaTech.edu
[mailto:javascript-bounces at LaTech.edu] On Behalf Of Peter Brunone
Sent: Wednesday, April 18, 2007 1:58 PM
To: javascript at LaTech.edu
Subject: re: [Javascript] Need some help validating a form


Hi Jim,

    I assume you're doing some kind of loop through the form elements,
perhaps with an array provided by
document.getElementsByTagName("INPUT").  If that's the case, you could
either (a) use the name or ID attribute to identify the type of element,
or (b) check the .type property of each element to see if the type is
"text" or something else.

    If that doesn't help, feel free to post the code that you're using.

Cheers,

Peter


________________________________

From: "James Macdiarmid" James.Macdiarmid at cgifederal.com

I have an application that keeps track of keywords. On the page I have 2
forms. One called frmEditKeywords and the other frmAddKeywords. The
frmEditKeywords calls the ValidateEditKeywords function on submit.The
frmEditKeywords has a couple control arrays such as a Textbox array, a
Dropdown Select box array, and a checkbox array.

Is there a way to only validate the textboxes on submit rather than
doing the whole form? Now I can't make updates using the dropdowns or
the checkboxes. It goes through the textbox validation first.

Hopefully the way I described this is understandable. Let me know if
it's not clear. 

Thank you in advance,
Jim 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20070420/6905cb07/attachment.htm>


More information about the Javascript mailing list