ASP var to Javascript - Please Help!!!!!

Results 1 to 2 of 2

Thread: ASP var to Javascript - Please Help!!!!!

  1. #1
    Join Date
    Dec 1969

    Default ASP var to Javascript - Please Help!!!!!

    I am trying to pass a text field to javascript, but the text field name will keep changing (Ex. txt_isbn & i & - i will be a number depending on what line the user is on - ex. txt_isbn0, txt_isbn1, etc...). I need to find the value of the field using javascript, but I cannot get it to combine the i with the name.<BR>Here is some of the code...<BR>response.write "&#060;input type=text name=txt_isbn" & i & " value=&#039;&#039; size=12 onBlur=&#039;javascript:getItem()&#039;&#062;"<BR> response.write "&#060;input type=hidden name=i_value value=" & i & "&#062;"<BR><BR>On the JScript side...<BR>function getItem() {<BR> i_value = neworderform.i_value.value<BR> isbn = neworderform.txt_isbn+i_value.value<BR> window.document.location = "get_item.asp?item=" + isbn<BR> }

  2. #2
    Join Date
    Dec 1969

    Default <%=i%>

    i is a server side vbscript variable, correct?<BR>then.. txt_isbn&#060;%=i%&#062;

Posting Permissions

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