[Javascript] Help with forwarding to another page
David T. Lovering
dlovering at gazos.com
Thu Mar 13 22:56:09 CST 2003
I'd try using layers to put the dynamic element above/below the static
one (or simply render the top one "hidden" as required). Assuming the
graphic sends some sort of signal or changes state when it concludes,
you could use a "watch" directive to act as an event trigger and use
another function driven by the event to do a location.href assignment
to the target page where their winnings are announced. It doesn't
sound that hard. [The transition between layers could be managed easily
by a simple "onClick" event handler attached to the static element].
If these hints aren't sufficient, drop me a line and I'll whack together
some working code fragments.
-- Dave Lovering
"Michael J. Mahony" wrote:
>
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dlovering.vcf
Type: text/x-vcard
Size: 304 bytes
Desc: Card for David T. Lovering
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20030313/0234cc35/attachment.vcf>
More information about the Javascript
mailing list