Adding Javascript to my page

Results 1 to 2 of 2

Thread: Adding Javascript to my page

  1. #1
    Join Date
    Dec 1969

    Default Adding Javascript to my page

    I am currently tring to tie up some loose ends by adding some javascript to my page. My problem is this: I have a dynamic list of text boxes<BR>&#060;input type="text" name="PRICE&#060;%=count%&#062;" value="&#060;%=detail(0)%&#062;" onChange="ChangeValue(&#060;%=count%&#062;);"&#062 ;<BR>Included in a loop<BR><BR>I would like to change the values of the total text box based on onChange<BR><BR><BR>Here is the javascript function I am trying to use<BR><BR><BR>function ChangeValue(num)<BR><BR>{<BR> var str="window.document.form1.AMOUNT"+num+".value=";< BR> <BR> str=str + "window.document.form1.PRICE"+num+".value*";<B R> str=str + "window.document.form1.QUANTITY"+num+".value";<BR> <BR> eval(str);<BR>}<BR><BR>Why is this concatention not working? Any help here would be appreciated including maybe a javascript messageboard<BR><BR>I have tried individual lines and they work fine<BR>i.e.<BR>window.document.form1.AMOUNT1.valu e=window.document.form1.PRICE1.value*window.docume nt.form1.QUANTITY1.value;<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Adding Javascript to my page

    try eval()ing the individual object references first<BR><BR>jason

Posting Permissions

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