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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling a field

Status
Not open for further replies.

dkin

Programmer
Dec 11, 2002
39
ES
When I disable a field I can not edit it and can not use $_GET with PHP. Is there an option that that will prevent field content editing and will allow me to use $_GET after submitting.
 
In IE you can use READONLY in a text field. Because Netscape doesn't allow this....

<form name=&quot;myForm&quot;>
<input name=&quot;myField&quot; readonly value=&quot;John Smith&quot; onBlur=&quot;this.value=document.myForm.hideField.value&quot;>

<input type=hidden name=&quot;hideField&quot; value=&quot;John Smith&quot;> Get the Best Answers! faq333-2924
&quot;A witty saying proves nothing.&quot; - Voltaire
mikewolf@tst-us.com
 
Unfortunately, Mozilla/Netscape are my favorite browsers, any alternative solution.
 
I wrote the alternative.... For each form field, you put an onBlur event that reloads the value from a hidden field.

Another option is to put the relevant data into a hidden field and simply display the data again. Like this:

Name: John Smith <input type=hidden name=&quot;fullName&quot; value=&quot;John Smith&quot;>

Then you just pull the data you want from the hidden field. Get the Best Answers! faq333-2924
&quot;A witty saying proves nothing.&quot; - Voltaire
mikewolf@tst-us.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top