rtnMichael
Programmer
Hey, I have a variable passed into another page through a form. The next page grabs it with a request.form, and that seems to work fine. But when I want to use it in a Javascript function, it doesn't recognize it as being set. How do I cross a variable from VBScript to Javascript?
Here's what I have:
set mylocation = Request.form("mylocation"
<script language="JavaScript">
if(mylocation == "home"
{
team = new Array(
new Array(
new Array("window","window"
,
new Array("door","door"
,
new Array("floor","floor"
)
);
}
else if(mylocation == "outside"
{
team = new Array(
new Array(
new Array("grass","grass"
,
new Array("rocks","rocks"
)
);
}
apperently the "set" is VBScript, and the rest is Javascript. It tells me that "mylocation" is undefined...what can I do?
Thanks
Mike
Here's what I have:
set mylocation = Request.form("mylocation"
<script language="JavaScript">
if(mylocation == "home"
{
team = new Array(
new Array(
new Array("window","window"
new Array("door","door"
new Array("floor","floor"
)
);
}
else if(mylocation == "outside"
{
team = new Array(
new Array(
new Array("grass","grass"
new Array("rocks","rocks"
)
);
}
apperently the "set" is VBScript, and the rest is Javascript. It tells me that "mylocation" is undefined...what can I do?
Thanks
Mike