Passing arguements

Results 1 to 2 of 2

Thread: Passing arguements

  1. #1
    Join Date
    Dec 1969

    Default Passing arguements

    I am trying to pass the following arguement. <BR><BR>onChange = sublist(document.subad.subcatagory&#060;%=number%& #062;.name) <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>I have also definately not used &#039subcat&#039 anywhere else and I know it is passing the correct value, as have sent the value to a text box. Many thanks. <BR><BR>

  2. #2
    NH Guest

    Default RE: Passing arguements

    Have you tried wrapping an eval function around it?<BR><BR><BR>function sublist(subcat) <BR>{ <BR>eval("this.form."+subcat+".length = 0"); <BR>} <BR><BR><BR>

Posting Permissions

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