473,698 Members | 2,943 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.Net Code to make Input button disappear immediately

I have been working on a form to update a database when i enter
details and click a button. My issue is that some of the users click
the button twice. I want to remove the button when i click it and show
a label saying "Processing "

How can i do this using the attributes.add code ???

thanks in advance

C
Nov 19 '05 #1
3 1866
>I have been working on a form to update a database when i enter
details and click a button. My issue is that some of the users click
the button twice. I want to remove the button when i click it and show
a label saying "Processing "

The easiest is to disable the button and change the button text. You can do
this with JavaScript, but be aware that users can disable JavaScript in
their browsers.

Just add this to your Page_Load handler:
MyButton.Attrib utes.Add("oncli ck","this.disab led=true;this.v alue=\"Processi ng...\";");

To show hide the button and show a label instead, just alter the JavaScript
code.

Anders Norås
http://dotnetjunkies.com/weblog/anoras/
Nov 19 '05 #2
"Anders Norås [MCAD]" <an**********@o bjectware.no> wrote in message
news:On******** ******@TK2MSFTN GP14.phx.gbl...
, but be aware that users can disable JavaScript in
their browsers.


I think/hope this warning is obsolete. I can't imagine anything meaningful
in ASP.NET without javascript.

Eliyahu
Nov 19 '05 #3
> I think/hope this warning is obsolete. I can't imagine anything meaningful
in ASP.NET without javascript.


Personally I love JavaScript. When I did the JavaScript implmenation of the
XmlSerializer class
(http://dotnetjunkies.com/WebLog/anor.../13/21962.aspx)
earlier this year some people even thought I had become obsessed with it.
However, there are some people who don't share my enthusiasm. There are some
organizations, such as military and financial institutions, who configure
their browsers with scripting switched off. Therefore one should be aware
that you cannot take script support for granted. Therefore the warning is in
place, but lack of script support is rarly an issue.

Anders Norås
http://dotnetjunkies.com/weblog/anoras/
Nov 19 '05 #4

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

Similar topics

6
1571
by: Andre | last post by:
Hi, I need to fetch a value in an Access db, so i use a form to pass the parameter for the SQL statement fromVB client to ASP. After the submit line in VBscript, i expect the value in order to test it and go further in VBscript. But my problem is when clicking on the button, that the VB code doesn't wait to get that value and continues directly, so the a=<%=totd%> line give 0 in stead of the real value. If i click a second time, i get...
2
2372
by: rked | last post by:
I get nameSPAN1 is undefined when I place cursor in comments box.. <%@ LANGUAGE="VBScript" %> <% DIM ipAddress ipAddress=Request.Servervariables("REMOTE_HOST") %> <html> <head> <meta http-equiv="Content-Type" content="text/html;
3
31773
by: FantaJ | last post by:
Hi, Is it possible to make a html button invisible using javascript? I can certainly disable it: var x=document.getElementById('button2'); x.disabled=true; //x.type = 'hidden'; // read only? //x.visible = false; // doesn't exist?
4
3507
by: John Boy | last post by:
Hi, Can anyone help. This is really doing my nut in. 3 years ASP exp. and now doing .DOT which is a step in the wrong direction. Basically I am left with the code of a guy who has left. When I click a button on a pop-up window the javascript for that button click does a 'button.form.submit'. On the Server side there is a Button click event for this button, but for some reason it no longer fires. It worked fine before and everything...
0
919
by: Hyphessobrycon | last post by:
hallo, why doesn't this function? Only when I select the datarow, push the delete button of the keyboard and then the btnrubriekweg button. why not immediately from the rubriekweg button only? a thankful Hyphessobrycon, the new fish in the vbOcean
2
1861
by: charles-brewster | last post by:
I have progressed the copytext function test page a little since my original post here in the small hours this morning. It now opens a debugging window so I can try to figure out what it is or isn't doing. Current version of the test page: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <head> <title>Testing JavaScript</title> <script language="JavaScript">
2
10087
by: jw01 | last post by:
I changed my code...Now everytime i click a radio button, a text box appears...What i want is when i hit a particular radio button, the textbox should only appear next to that radio button. And if another radio button is selected, then the 1st textbox should disappear and should display in front of the new radio button selected. Following is my code: <html> <head> <script type="text/javascript">
5
6863
by: Susan Bricker | last post by:
I have a command button that I'd like to make "disappear" after being clicked and after the OnClick function has executed. I have tried changing the 'visible' attribute to false while within the OnClick function but that won't work because the button control has the focus. I traced and put a trap at the top of form_current but it didn't hit there. Any suggestions?
2
4034
by: tesa | last post by:
I am not able to figure out how to make this work. I am trying to create a hangman game. I am in a basic javascripting class. I am to only use very basic code as you can see. I am able to use any online resources to help me. I have added alot of comments for what should be happening however is not happening. I also have a teacher that teaches us one way but then asks us to do things he has not taught. I am trying my very best. Any...
1
8902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8873
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7740
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4623
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2339
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.