Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    pbm
    pbm is offline
    New to the CF scene
    Join Date
    Jul 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with Internet Shortcut (.URL) that executes Javascript after page is loaded

    I am trying to create an .url file that goes to a website and executes a javascript after the page is loaded.
    This is the part of the .url where it goes to the website:

    Code:
    [InternetShortcut]
    URL=javascript:window.location.href='http://www.website.com/1/2'
    And this is the part that needs to be executed when the page is finished loading (right now I'm doing this manually in the browsers' address bar every time I go to this website):

    Code:
    javascript:showPlayer('liveStr','tsb_1','10','videoplayer');
    How should I integrate this with the first part?
    I've tried the following:

    Code:
    [InternetShortcut]
    URL=javascript:window.location.href='http://www.website.com/1/2';window.onload=showPlayer('liveStr','tsb_1','10','videoplayer');
    But that didn't worked.
    Last edited by pbm; 07-02-2012 at 03:25 AM.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,078
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    You can't issue a command for another page, that is the page which you are redirecting to.

    All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.


  •  

    Posting Permissions

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