simple jquery action on link

Discussion in 'jQuery' started by seo-essentials, Nov 24, 2012.

  1. #1
    Hi
    I am looking to do the following with jquery:

    When user clicks on a link on my site it opens page1 in the same window after 15seconds and page2 in a new window
    This is to open a video on a new page from a third party site, when they are done with the video they close that window and they are on the next page on my site.
    Thank you for your help!
     
    seo-essentials, Nov 24, 2012 IP
  2. Jekwueme

    Jekwueme Greenhorn

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #2
    i think that's something best doing on AJAX because it sounds more server based? or am i getting the wrong end of the stick?
     
    Jekwueme, Nov 28, 2012 IP
  3. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #3
    You can't 'open a page' in a web browser, the browser is looking at a page. If it's looking at the page with your jQuery code, it'll execute that code. When it looks at another page ('opens' the new page), it'll execute code on THAT page. it can't execute code on two pages at once, which is what you're sort of looking to do.

    Go to the page that gets the video and plays it. (Send that page the URL of the next page on your site.) OnClose, relocate to the next page. As Jekwueme says, it's easier to do on the server than in the browser.
     
    Rukbat, Nov 30, 2012 IP