J
Jonas Daunoravicius
The subject pretty much sums up what I need to do. Here is what I
have so far, but still can't figure out how to get it working:
<script language="javascript" type="text/javascript">
function fillForm()
{
// split the query string into pieces
var qs = location.search.substr(location.search.indexOf("?")+1);
qs = qs.split("&");
alert(qs); // qs is the variable that I need to pass into a
// vbscript var. This actually works up to here.
'<%the_name%>' = qs // this line does not work, but is what I need
// to do.
}
</script>
later in the code:
<%
Response.write ("<script>fillForm();</script>")
Response.write("This is the variable: " & the_name)
%>
On the page it obviously comes up as "This is the variable: " and that
is it...blank for the_name.
I need to use javascript to get the variables out of the url, such as:
http://www.x.com/test.asp?Dell Computer Corp
qs will then end up being "Dell Computer Corp" and I need to make a
vbscript variable to also be that so I can query/load/etc certain
stuff in asp to display on the site.
Thanks for your help!
- Jonas
have so far, but still can't figure out how to get it working:
<script language="javascript" type="text/javascript">
function fillForm()
{
// split the query string into pieces
var qs = location.search.substr(location.search.indexOf("?")+1);
qs = qs.split("&");
alert(qs); // qs is the variable that I need to pass into a
// vbscript var. This actually works up to here.
'<%the_name%>' = qs // this line does not work, but is what I need
// to do.
}
</script>
later in the code:
<%
Response.write ("<script>fillForm();</script>")
Response.write("This is the variable: " & the_name)
%>
On the page it obviously comes up as "This is the variable: " and that
is it...blank for the_name.
I need to use javascript to get the variables out of the url, such as:
http://www.x.com/test.asp?Dell Computer Corp
qs will then end up being "Dell Computer Corp" and I need to make a
vbscript variable to also be that so I can query/load/etc certain
stuff in asp to display on the site.
Thanks for your help!
- Jonas