If Then statement

Giganews Newsgroups
Subject: If Then statement
Posted by:  shank (sha…@tampabay.rr.com)
Date: Mon, 21 Jul 2003

I'm coming from the ASP worl and have no clue to javascript. In the
following code, I'm trying to set the value for variable strPage, then use
that in the redirect statement. The page does nothing. No redirect at all.
What should the synatx be?
thanks!

<SCRIPT LANGUAGE="JavaScript">
if Session("SoftHard") = "Hard"
{
strPage = "hardpage.asp?OrderNo=" & Session("OrderNo");
}
if Session("SoftHard") = "Soft"
{
strPage = "softpage.asp?OrderNo=" & Session("OrderNo");
}
setTimeout("top.location.href = strPage",4000);
</SCRIPT>

Replies