Error in javascript form validation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gaurav Jhamb
    New Member
    • Mar 2008
    • 8

    Error in javascript form validation

    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.


    [CODE=javascript]if(doc.INC_COMP _SURNAME.option s[doc.INC_COMP_SU RNAME.selectedI ndex].text != ""){
    selectedCount++ ;
    }
    if(doc.INC_COMP _GIVEN.options[doc.INC_COMP_GI VEN.selectedInd ex].text != ""){
    selectedCount++ ;
    }[/CODE]


    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
    Last edited by gits; Jun 24 '08, 06:57 AM. Reason: added code tags
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    How did you call the Javascript function? i.e Could you please post a bit more of the relevant code?

    Comment

    Working...