By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,939 Members | 1,623 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,939 IT Pros & Developers. It's quick & easy.

Error in javascript form validation

P: 8
I m doing search on the basis of entering text field value its working ok but when i click on search button it shows error on the browser and after that done.
when i open the detail of error it shows 'fieldname(name of my field).options' is null or not an object.

Expand|Select|Wrap|Line Numbers
  1. if(doc.INC_COMP_SURNAME.options[doc.INC_COMP_SURNAME.selectedIndex].text != ""){
  2.         selectedCount++;
  3.         }
  4.         if(doc.INC_COMP_GIVEN.options[doc.INC_COMP_GIVEN.selectedIndex].text != ""){
  5.         selectedCount++;
  6.         }

this is my code. i am doing search to fill either of between two textboxes.these are string tye.

Please give me solution.

Thanx in Advance

Gaurav Jhamb
Jun 24 '08 #1
Share this Question
Share on Google+
1 Reply

P: 13,264
How did you call the Javascript function? i.e Could you please post a bit more of the relevant code?
Jun 24 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.