Advanced Search

Results 1 to 5 of 5

Thread: The "javascript:...etc" commands

  1. #1
    Join Date
    May 2005
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool The "javascript:...etc" commands

    I need to know all the javascript commands for closing a windows, reloading, returning, forwarding,..etc

    Thanks

  2. #2
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well with Frontpage, just type "window." and it'll give you the options.

    Or you could use www.google.com.



    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  3. #3
    Join Date
    May 2005
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    cr3ative,

    I don't know if you got my point or not. I need to know the commands that can be inserted as links to close window, maximize windows, go back, go forward..etc

    They start with "javascript: "

    I tried the window thing but it didn't work.

  4. #4
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Back: <a href="javascript:history.go(-1)">Back</a>
    Forward: <a href="javascript:history.go(1)">Forward</a>
    Close: <a href="javascript:window.close()">Close Window</a>
    Maximize: Not avaliable
    Minimize: Not avaliable

    This is all really easy to find using Google.
    Sorry to sound a bit flamy, but really:
    http://www.google.co.uk/search?hl=en...G=Search&meta=

    Gives you all the answers you need : )

    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  5. #5
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Haisook
    I don't know if you got my point or not.
    He did. He's basically saying that you should look for a reference document that lists methods of the window (and history) object.

    I need to know the commands that can be inserted as links to close window, maximize windows, go back, go forward..etc

    They start with "javascript: "
    Not necessarily. What you're referring to is the javascript: pseudo-scheme. This can be used where a URL is expected, and causes the execution of script statements and expressions. However, most use of this pseudo-scheme is inappropriate: if blindly included in a public site, you'll be presenting - perhaps even relying on - something that will result in an error for users that haven't enabled client-side scripting.

    The best way to include, say a link using the pseudo-scheme, is to write it in with the write method. For example,

    Code:
    if(('object' == typeof history) && history.back) {
      document.write('<a href="javascript:history.back()">Go back<\/a>');
    }
    If you want to invoke these methods amongst other code, then the pseudo-scheme isn't necessary.

    Mike

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
  •