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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

validation on select

Status
Not open for further replies.

timmbo

Programmer
Feb 22, 2001
167
US
Trying to validate if select multiple is populated. I have two select multiples - one populated and the other blank. User has ability to click on item in populated select and copy item to unpopulated select. Problem: When I try to validate the recieving select after initializing myValidation(), my code

var myAccounts = eval('document.' + frmName + '.SelAccounts.value');

does not see the item copied into the rec select. I tried ...'.SelAccounts[0].value');. I get an error msg say it is not an object.
I want the code to validate if unpopulated select has items in it. If not, show msg.

Any help would be greatly appreciated.
 
Thanks jaredn for the quick reply. Forgive me is this is a stupid question/statement; I'm new to this. My SelAccounts select does not have <option></option>. I thought since it is being populated dynamically, I would not need it. Is this the case? When I did enter option, SelAccounts select would have a blank line at the top. Is there a way of surpressing this???

TIA
 
Jaredn,

I answered my own question. Thanks once again for the help.
Have a good one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top