Dynadot โ€” .com Transfer

"BLOCKED" text boxes?

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

PoorDoggie

Soon to be RICHdoggie!VIP Member
Impact
18
Hi. On some websites they seem to have a way of "blocking" textboxes and sometimes buttons. You know the places where you click on the button and it goes gray and you can't click on it again. Or where you submit a form and to tell you what you have submitted they show the form again, but with textboxes you cant write into this time?

I want to be able to do that?

Can anyone help me?

Thanks
Tom
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
These sites use javascript.

A script that does this should be easy enough to find using somewhere like hotscripts
 
0
•••
HTML:
<input type="text" size="12" DISABLED>

This will disable the text box from being entered into. Just add DISABLED into any form element.

But if you want to go all the way, and disable the submit button on submit, Then You may use this code that I took ages Tracking down one time on a project of mine:

PUT THIS CODE ANYWHERE IN YOUR PAGE:
HTML:
<script>
function submitonce(theform){
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}
</script>

THEN add

HTML:
NAME="submit" 

or

NAME="reset"

... To your Submit or reset button tags

EXAMPLE:

HTML:
<input type="submit" value="Submit Me!" NAME="submit">
<input type="reset" value="Reset Me!" NAME="reset">

And this should make those Objects Disable on Submit!

Hope this Helps! :)
 
Last edited:
0
•••
wow thanks

I just wanted the "disabled" bit, so that I could use it as part of the display in my website. I hope you didn't go to too much trouble geting all that javascript! :)

Thanks
Tom
 
0
•••
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back