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 SkipVought 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
0
0
ES
When I disable a field I can not edit it and can not use $_GET with PHP. Is there an HTML option that that will prevent field content editing and will allow me to use $_GET after submitting.
 
How about using a dummy name for the field and creating a second hidden field with the real name of the data you want to pass on?
 
Include the 'Readonly' attribute in the <INPUT> tag. Thanx Dave Shaw!
 
or in javascript:

fieldObject.disabled = true; --BB
 
in html if you use disabled the variables normally do not pass
either use readonly tag
e.g. <input type=&quot;text&quot; name=&quot;one&quot; readonly>

or try using some javascript

<input type=&quot;hidden&quot; name=&quot;two&quot; value=&quot;document.form1.one.value&quot;>

I still have not been able to figure out why the values get messed up when you disable the field. This has not happened consistently, it happens once a while
 
I find the wonderful thing with javascript, you can get around anything :) --BB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top