the simplest thing to do is simply disable the buttons themselves. That's
the most error-free method and most cross-platform. There's a script over at
dynamicdrive that shows an example of exactly that.
http://www.dynamicdrive.com/dynamici...submitonce.htm
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Sehboo" <> wrote in message
news: oups.com...
> Ok, let me try it again.
>
>
> I am copying the header section from my page here - maybe I am missing
> something
>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <HTML>
> <HEAD> <TITLE></TITLE>
> <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
> <meta name="CODE_LANGUAGE" Content="C#">
> <meta name="vs_defaultClientScript" content="JavaScript">
> <script language="JavaScript">history.forward();
> function ignoreinput()
> {return false;}
> function stop_input()
> {
> window.attachEvent("onkeydown", ignoreinput);
> window.attachEvent("onclick", ignoreinput);
> }
> </script>
> </HEAD>
> <BODY LEFTMARGIN=0 TOPMARGIN=0 BOTTOMMARGIN=0 RIGHTMARGIN=0
> onLoad='javascript:setDefaultButtonScript()'>
> <form name="_ctl16" method="post" action="MyPage.aspx"
> language="javascript" onsubmit="return stop_input();" id="_ctl16"
> runat="server">
>
>
> I have two buttons on this page, print and cancel. Print takes about
> 10 seconds to print the report and cancel just take you back to the
> previous page. If I click on print and after two seconds, click on
> cancel then it takes me back to the previous page. What I want is that
>
> once user clicks on print, all the other controls should be disabled
> (or ignored).
>
> Why my above code doesn't work? I got this code from this group.
>
> thanks
>