Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server Side Validation

Status
Not open for further replies.

rich0335

Programmer
Oct 16, 2001
5
US
I am attempting to do server-side validation on a select box that was created and populated client-side. The following code is what I thought should work. I'm attempting determine if the box contains options and if so, how many. The box may not be populated at all and the options will never be selected. I get the error message 'Request.Form(...).0.value' is null or not an object. I realize I'm doing something wrong with the array object...not sure what though. Thanks in advance!!



var temp=Request.Form("skills2")[0].value
if( temp > 2 || temp < 0 ){
alert('You must select at least on skill, but no more than 3')
return false;
}
 
Hmm, Request.Form(&quot;skills2&quot;)[0].value, would imply an array of the form skills2 if I'm not mistaken, but since I haven't used this method and my handy dandy O'reilly Javascript Refrence isn't with me right now, I'm just suggesting that as possible error.

Hope that helps
JavaDude32
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top