NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page "BLOCKED" text boxes?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 02-19-2005, 05:16 PM THREAD STARTER               #1 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
Join Date: Jan 2005
Location: UK
Posts: 2,408
PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nice
 



"BLOCKED" text boxes?


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
PoorDoggie is offline  
Old 02-20-2005, 01:11 PM   #2 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,074
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
These sites use javascript.

A script that does this should be easy enough to find using somewhere like hotscripts
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 02-20-2005, 02:11 PM   #3 (permalink)
Senior Member
 
Jiblob's Avatar
Join Date: Dec 2004
Location: .co.uk
Posts: 2,237
Jiblob is just really niceJiblob is just really niceJiblob is just really niceJiblob is just really nice
 





HTML Code:
<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 Code:
<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 Code:
NAME="submit" 

or

NAME="reset"

... To your Submit or reset button tags
EXAMPLE:

HTML Code:
<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!
????: NamePros.com http://www.namepros.com/programming/71036-blocked-text-boxes.html

Hope this Helps!
Last edited by Jiblob; 02-20-2005 at 02:25 PM. Reason: More Code for you :)
Jiblob is offline  
Old 02-20-2005, 03:16 PM THREAD STARTER               #4 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
Join Date: Jan 2005
Location: UK
Posts: 2,408
PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nice
 



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
PoorDoggie is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:46 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger