Catch link and stop navigation

Discussion in 'JavaScript' started by Echilon, Oct 19, 2007.

  1. #1
    I have a page which uses scriptaculous to show a form. I'd like to add some way of showing the form if JavaScript is disabled. I was thinking I might be able to stop the user navigating away and instead call scriptaculous if JavaScript is enabled, but I have no idea how I'd do it.
     
    Echilon, Oct 19, 2007 IP
  2. KatieK

    KatieK Active Member

    Messages:
    116
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    58
    #2
    To have the form appear when JavaScript is disabled, you can simply write out the form in the HTML. You can then hide it if JavaScript is disabled by having the form in a div, and hiding that div with JavaScript.

    I don't know how you'd be able to prevent the user from navigating away. (They hate that.)
     
    KatieK, Oct 22, 2007 IP
  3. Alexander the Great

    Alexander the Great Peon

    Messages:
    253
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Preventing the user from navigating away is a great way to prevent the user from visiting in the first place.
     
    Alexander the Great, Oct 22, 2007 IP