Disable webpage controls during postback round trip

S

Sehboo

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top