Hi, anyone see anything wrong with this?

//validate selectlists that need a value selected
selectlist = new Array('selectitem','selectitem2');
for(element=0;element<selectlist.length;element++)
 {
 doc = eval('document.forms[0].'+selectlist[element]);
 if(doc.selectedIndex == -1)
  {alert('You must select at least one item for '+selectlist[element]);
return false}
 }

--or does anyone have an alternative? Soz for being lazy but I'm in a
blinding rush!



-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to