Passing JavaScript Arguements

Results 1 to 2 of 2

Thread: Passing JavaScript Arguements

  1. #1
    Join Date
    Dec 1969

    Default Passing JavaScript Arguements

    I am trying to pass the following arguement. <BR><BR>onChange = sublist(&#039subcatagory&#060;%=number%&#062;&#039 ) <BR><BR>Is there any obvious reason why it would&#039nt work in the following line. Obviously not all the code is here, but should it be possible to pass a string as an arguement and then use it in the following line to identify an object name? <BR><BR> function sublist(subcat) <BR> { <BR> this.form.subcat.length = 0 <BR> } <BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Passing JavaScript Arguements

    The idea works fine. I presume that higher up in the code you already have defined the strings subcategory1, subcategory2 etc...<BR>and that the function sublist simply checks the length of the string.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts