tags:

views:

46

answers:

2

i am trying to make a text box no editable for the users. I tried using this code and it works. Any ramifications??? I mean do u suggest the use of this code or it may cause trouble for me in future???

<input type="text" name="west" value="fixed value" readonly />
+3  A: 

you shouldnt have a problem with this code as the inputs value gets submitted along with any other inputs in the form.

I would change it to be readonly="readonly" so that it is valid xhtml.

skyfoot
That's only if you want valid xhtml, at the moment it's valid html and that's good enough for most people.
Andy E
+2  A: 

Hello, You must be aware that anybody can change this to something writable using a tool like firebug.

greg0ire