Results 1 to 2 of 2

Thread: Dynamic pageload after progress bar timer

  1. #1
    Join Date
    Jan 2008
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Post Dynamic pageload after progress bar timer

    1) Script Title: Time-based Progress Bar

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...mlprogress.htm

    3) Describe problem:
    Is there a way to have the script open a specific page based on what link i have clicked after it loads the bar and not just a static page?
    something with this logic perhaps?

    when user clicks specified link (by id or rel if possible) {
    if specified link id = xID { window.location="x.htm"; }
    if specified link id = yID { window.location="y.htm"; }
    if specified link id = zID { window.location="z.htm"; }
    etc...
    }


    thanx
    Last edited by Beta Cygni; 11-11-2008 at 12:01 AM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I'm not clear on the sequence of events. If you want three links each going to a different page, and you want the user to see the progress bar first, you could have it be activated by the links, example link:

    HTML Code:
    <a href="some.htm" onclick="progressBarInit.loc = this.href;progressBarInit();return false;">
    Text or Image Here</a>
    Then in the action area:

    Code:
    var action=function()
    {
    //alert("Welcome to Dynamic Drive!");
    window.location = progressBarInit.loc;
    }
    If you were to do it this way, you would also want to remove:

    Code:
    window.onload=progressBarInit;
    from the end of the script.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •