"Grab" value from textbox and put it into a variab

Results 1 to 4 of 4

Thread: "Grab" value from textbox and put it into a variab

  1. #1
    Geir A. Hammar Guest

    Default "Grab" value from textbox and put it into a variab

    I want to grab the value from a form textbox, and put the value into a variable. <BR><BR>Eks:<BR>&#060;A HREF="./shopping.asp?action=add&item=&#060;%= A %&#062;"&#062;Put in shopping cart&#060;/A&#062; <BR><BR>The variable "A" must change when the value in the textbox change..<BR><BR>How do I do this?<BR><BR>Thank you<BR><BR>Regards<BR><BR>Geir

  2. #2
    Join Date
    Dec 1969

    Default Java?

    If I understand this correct you want to change the variable A without sending the page to the server. Direcly when a value is changed in a textbox the variable A should change.<BR><BR>As far as I know this cannot be done with ASP cause the page has to be sent to the server to do something.<BR><BR>But it can be done with java. I have done something like it once.<BR><BR>But if you want to use ASP you could do like this:<BR>Name the textbox "TheAvariable", send the whole thing to the server. Take the &#039mail-url&#039 (./shopping.asp?action=add&item=)<BR>and add the "TheAvariable" like this:<BR>Url = "./shopping.asp?action=add&item=" & TheAvariable<BR><BR>Then use URL to get the right page.<BR>This is not a practical programmingexample but just the way I think.<BR><BR>Hope it helps some (I would go with the java)<BR>

  3. #3
    Geir A. Hammar Guest

    Default RE: Java?

    The variable is now set when i push the submit button or press enter inside the textbox.<BR><BR>But is it possible to send it to the server(like when I press a link) when I press enter inside the textbutton or press the submit button. The variable must be set so what is sent is what is in the textbutton.

  4. #4
    Steve Rowson Guest

    Default RE: Java?

    If you find out how to put the value of a textbox into a url string please publish it here. I&#039ve wasted three days trying to do this.

Posting Permissions

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