Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Disable webpage controls during postback round trip

Reply
Thread Tools

Disable webpage controls during postback round trip

 
 
Sehboo
Guest
Posts: n/a
 
      12-13-2006
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

 
Reply With Quote
 
 
 
 
Mark Fitzpatrick
Guest
Posts: n/a
 
      12-13-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent round trip of postback moondaddy ASP .Net 3 10-05-2007 03:04 PM
Are Postback and Round Trip to the Server the same thing? Tony Girgenti ASP .Net 7 04-01-2007 08:50 AM
Disable web page controls during postback round-trip Sehboo ASP .Net 2 12-12-2006 12:55 PM
Disable web page controls during postback round-trip =?Utf-8?B?TGFycnk=?= ASP .Net 2 03-09-2006 04:05 PM
E3 round trip delay vsakel Cisco 2 10-25-2003 09:22 AM



Advertisments