[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Read Only Form Input Fields



> 
> Grady Russell wrote:
> > 
> > On my pages, I keep getting users calling it Java when its JavaScript. Its
> Does any one know how to implement read only text fields in a
> form. The scenario is this. I have developed an order processing 
> system using Javascript and forms. The user types a product code and
> my script looks this up and fills in a description and price fields. 
> 
> I do not want the  user to be able to change these.
> 
I have done it in onChange (or onBlur) handler in the field I want
to have it read-only. Just to put back a original value:

   ...onChange="this.value=this.defaultValue">

But, I have heard the rumour that in the future we will have a possibility
to disable (grayed) a field. Maybe that will be the right way for read-
only purposes.

Regards,
Martin
 
------------------------------------------------------
| Martin Senger     m.senger@dkfz-heidelberg.de      |
|                   voice: (0049) 6221/422340        |
|                   fax:   (0049) 6221/422333        |
------------------------------------------------------
--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/