SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    May 2005
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Calling function via the address bar

    Hi,

    Is there any way to call a js function via something like:
    Code:
    http://www.domain.com/?variable
    Also, I have a Scroller script thats being called onload by the body and another custom function called onload by the window however I'm running into trouble calling the scroller.

    Any help on these issues is greatly appreciated.

    Cheers

  2. #2
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You mean that one of the window.onload is overwriting the other one? If window.onload is redefined, then the last one will overwrite the first one.

  3. #3
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are viewing a page that contains javascript functions you can execute one of them from the address bar like this:

    javascript:void(myFunc());

    or you can do something like this:
    javascript:void(alert(document.body.innerHTML));


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
  •