disable button when leaving page

Discussion in 'ASP .Net' started by Anonymous, Aug 2, 2008.

  1. Anonymous

    Anonymous Guest

    Which is the correct approach to disable buttons when leaving an aspnet
    page?

    Currently I have the following html, which disables buttons when pressing F5
    in FireFox, which ofcourse can occur before leaving the page.

    <html>
    <body onbeforeunload="document.getElementsByTagName( 'input' )[0].disabled =
    true">
    <form name="form1" method="post" action="Default.aspx" id="form1">
    <input type="submit" name="Button1" value="With FireFox, this button gets
    disabled when pressing F5. Not so in IE." id="Button1" />
    </form>
    </body>
    </html>
     
    Anonymous, Aug 2, 2008
    #1
    1. Advertising

  2. Anonymous

    Munna Guest

    Hi,

    Exactly what are you trying to accomplish here?

    Regards

    Munna
     
    Munna, Aug 3, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rich
    Replies:
    1
    Views:
    400
    bruce barker
    Feb 20, 2004
  2. brian

    Leaving a Page

    brian, Jun 11, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    3,561
    Justin Beckwith
    Jun 12, 2004
  3. sylvia sil
    Replies:
    1
    Views:
    619
    Curt_C [MVP]
    Dec 29, 2004
  4. UJ
    Replies:
    4
    Views:
    2,785
    Curt_C [MVP]
    Aug 10, 2005
  5. Chuck
    Replies:
    0
    Views:
    267
    Chuck
    Nov 10, 2003
Loading...

Share This Page