| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Soon to be RICHdoggie! Join Date: Jan 2005 Location: UK
Posts: 2,408
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | "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 |
| |
| | #2 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,074
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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 |
| |
| | #3 (permalink) |
| Senior Member Join Date: Dec 2004 Location: .co.uk
Posts: 2,237
![]() ![]() ![]() ![]() | HTML Code: <input type="text" size="12" DISABLED> 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> HTML Code: NAME="submit" or NAME="reset" ... To your Submit or reset button tags HTML Code: <input type="submit" value="Submit Me!" NAME="submit"> <input type="reset" value="Reset Me!" NAME="reset"> ????: 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 :)
|
| |
| | THREAD STARTER #4 (permalink) |
| Soon to be RICHdoggie! Join Date: Jan 2005 Location: UK
Posts: 2,408
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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 |
| |