[Javascript] Help with forwarding to another page
Chris Tifer
christ at saeweb.com
Fri Mar 14 08:20:29 CST 2003
Are you getting a JavaScript error in your browser? If so, what does
it say? I just tried a sample very similar to yours with what looked like
the same exact code and it worked for me.
Show us the code that has been spit out by ASP instead of what it looks
like before. Maybe the sPicture is something weird.
Chris Tifer
http://www.emailajoke.com
----- Original Message -----
From: "Michael J. Mahony" <lists at mahonyconsulting.com>
To: <javascript at LaTech.edu>
Sent: Thursday, March 13, 2003 10:50 PM
Subject: [Javascript] Help with forwarding to another page
> I'm doing something very simple but I can't seem to get it to work. I
> want to load a page that has a graphic and a button that says "SPIN"
> (the
> graphic is a spinning wheel). When the user clicks "SPIN" my script
> replaces the static graphic with an animated graphic that was chosen by
> the ASP script as the page loaded. When the graphic is done I want to
> push the user to a page that tells them what they won. Here is the
> script
> I'm using:
>
> <script LANGUAGE="javascript">
> <!--
> function spinWheel()
> {
> document.wheel.cmdSpin.disabled = true;
> document["user1"].src="<%=sPicture%>";
> window.setTimeout("window.top.location.href='spin_result.asp'", 3000);
> }
> //--> </script>
>
> If I include the setTimeout line the button never works and the
> graphic never changes. If I don't include the setTimeout I have no
> way to get the user to the next page.
>
> How can I accomplish this seemingly simple task?
>
> Thanks,
>
> Mike
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list