JScript to ASP variable

Results 1 to 3 of 3

Thread: JScript to ASP variable

  1. #1
    Cheyne Guest

    Default JScript to ASP variable

    How do I set an ASP variable value using a value from a JavaScript variable?

  2. #2
    Join Date
    Dec 1969

    Default RE: JScript to ASP variable

    &#060;script&#062;<BR>var x;<BR>x=100;<BR>window.location.href="abc.asp?var1 ="+x;<BR>&#060;/script&#062;<BR><BR>catch the value of var1 in abc.asp as request.querystring("var1")and set it to an asp variable.<BR><BR>I think this is the only way.

  3. #3
    Join Date
    Dec 1969

    Default RE: JScript to ASP variable

    You&#039;ll need to set up a form and a hidden variable within that form. When the form is submitted, have a Javascript function that does this:<BR>document.&#060;form name&#062;.&#060;hidden variable&#062;.value=&#060;javascript variable&#062;<BR><BR>On the page the form is submitted to, get the variable by using request.form.

Posting Permissions

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