473,394 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Disable webpage controls during postback round trip

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

Dec 13 '06 #1
1 1246
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" <Ma*********@gmail.comwrote in message
news:11**********************@l12g2000cwl.googlegr 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

Dec 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Anand Sagar | last post by:
I have a Panel1 and button1 on my webform. At runtime, I create 2 textboxes. I do it at the Page_Load event. I put the code within the " If Not isPostBack" For the button click event, I will do...
13
by: Chris Thunell | last post by:
I have created several grids dynamically and have added them to different HTML placeholders on a vb.net web form. The grids and controls within them come up and view beautifully when the web page...
2
by: Larry | last post by:
Is there a way to disable all the controls the instant any auto-postback controls are changed (resulting in a postback that takes a couple seconds), so that the user can't continue changing other...
2
by: Sehboo | last post by:
We want to prevent user from being able to click on a button twice or click on other controls while processing is going on. I tried the following javascript code (which was suggested in this group...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.