?
Solved

set server side vbscript variable from client side javascript?

Posted on 2002-03-04
2
Medium Priority
?
1,402 Views
Last Modified: 2008-02-26
I have a variable I have set using client side javascript ..

when I open another window, is there any way I can set a server side vbscript variable from that javascript variable?

i'm using iframes when i load the asp pages, so i could access that variable in javascript like this:

window.parent.parent.myVariable

but can I somehow take that variable and assign it to a vbscript variable?

Thanks,

0
Comment
Question by:SeanGraflund
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 29

Accepted Solution

by:
Göran Andersson earned 200 total points
ID: 6838990
There is basically two ways of sending values from the client side to the server side, either in the query string, or in a form.

Query string:

---javascript on first page---
var value=42;
window.open('Page2.asp?Param='+value,'_blank');

---Page2.asp---
<%
Value=Request.Querystring("Param")
%>

Form:

---first page---
<form name="TestForm" action="Page2.asp">
<input type="hidden" name="HiddenField" value="">
</form>
<script>
value=42;
document.TestForm.HiddenField.value=value;
document.TestForm.submit();
</script>

---Page2.asp--
<%
Value=Request.Form("HiddenField")
%>
0
 
LVL 1

Author Comment

by:SeanGraflund
ID: 6847142
well, i understand how those two work, but it didn't provide the results i wanted ..

there is a 3rd option for passing variables from javascript to vbscript ... cookies.  i used that.

thanks,

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question