Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set a Button To Type=Hidden from vbscript 1

Status
Not open for further replies.

gjhills

Programmer
Aug 22, 2002
4
GB
How do you set a button to type=Hidden, on a form, on an ASP page so it can't be pressed again? The onclick event runs a vbscript procedure to add some options to a combo box.
 
Does the form post to itself?

Maybe you could post the code (or at least some of it). - FateFirst
 
I've used the following code to Disable the button, but wondered if anything else could be done that would make it invisible
 
I've used the following code to Disable the button, but wondered if anything else could be done that would make it invisible:-

UserForm.AddCountries.disabled=True
 
Try this, i have it on one of my pages and it works great... looks cool too :)

<input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Submit Application&quot; onClick=&quot;if(this.value == 'Submit')
this.form.submit(); this.value = 'Please Wait.';&quot;>
<img src=&quot;spacer.gif&quot; width=&quot;10&quot; height=&quot;8&quot;>
<input type=&quot;reset&quot; name=&quot;Submit2&quot; value=&quot;Clear Form&quot;>
 
You could do this:

Code:
UserForm.AddCountries.style.visibility='hidden'
To err is human, but to really foul things up requires a computer.
- Farmers' Almanac, 1978

 
If you change the visibility ilke above than the space the button is in will still be there without the button, if you want the page to shift over where the button was than use the display:none/inline style attribute:
Code:
<input type=&quot;submit&quot; value=&quot;Click Me!&quot; style=&quot;width:150px;height:50px&quot; onClick=&quot;this.style.display='none';waitMsg.style.display='inline';&quot;>
<div name=&quot;waitMsg&quot; style=&quot;width:150px;height:50px;display:none;&quot;> Processing, Please Wait....</div>
This would show the button until they click it, upon whcihc it would seemingly be replaced with the &quot;Processing, Please Wait&quot; message that would take the same exact space the button had been. The referencing may be a bit off, but the concept works.
-Tarwn ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
Thank you, I've got exactly what I needed. I used .display='none' at the end of my VBScript procedure and its done the trick!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top