Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

client variable ---> server variable 3

Status
Not open for further replies.

loganswell

Programmer
Dec 28, 2000
111
GB
Please help me before I go nuts....

There HAS to be a way to do this.

If a variable in client javascript has a value, there must be a way of sending it to an ASP page for further processing. The ASP page to accept the value I'm okay with (Request.Querystring("var") but it's how to get the value into the url ... as a parameter

Thanx
 
You could just use the javascript
Code:
window.location.href("myPage.asp?myVar");

Is that what you're looking for???
 
you would probably need to redirect the browser using Javascript.

For example:

(in javascript)
location.href = "somePage.asp?var1=" +someValue+ "?var2=" +anotherValue;

(Forgive me if my syntax is wrong, I tend to get my syntaxes mixed up :) )

Then in somePage.asp:

dim var1, var2
var1 = Request.QueryString("var1")
var2 = Request.QueryString("var2")

hope this helps you out.

good luck
 
Hey Best of all, use a hidden text box.

formname.hiddentext1.value = ClientSideVariable;


From server side, use

Request.Form("hiddentext1")

to capture it. Thats all. Chapter closed.

Hope this helped.

RR
 
WOW!!

Thanks to all who responded - that's great!

Regards,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top