Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: Re: readonly


Message #1 by "Pawan Gupta" <pawan.gupta@i...> on Thu, 13 Jun 2002 12:01:04 +0530
some browsers support the DISABLED attribute, although not all, as this is 
a Javascript, I would suggest using onfocus="blur()", although you could 
just display the value without the HTML Form tag making in definitely 
readonly ;-)

At 12:01 13/06/02 +0530, you wrote:
>hi to all
>
>Is there any way to define the field to readonly
>
><input type="text" name="name"  readonly  >
>
>i want this by using js function
>
>pawan
>
>----- Original Message -----
>From: Greg Griffiths <greg.griffiths@g...>
>To: JavaScript HowTo <javascript_howto@p...>
>Sent: Wednesday, June 12, 2002 12:39 AM
>Subject: [javascript_howto] Re: Assigning a value in a text box from a
>function
>
>
> > try :
> >
> > document.SurveyForm.anshd.value='1';
> >
> > At 21:07 10/06/02 +0000, you wrote:
> > >Hello all,
> > >
> > >I have a function that validates whether the right information has been
> > >entered by the user. If the function returns a true, I know everything is
> > >fine, therefore would like to assign a value "-1" in a hidden textbox and
> > >then submit the form.
> > >
> > >I have used "SurveyForm.anshd.value = -1;" where SurveyForm is my form
> > >name and anshd is my text box. I would like to assign it a -1 value.
> > >
> > >This simple thing to do in VB is not happening in javascript for me.
>Could
> > >someone please guide me of what I am doing wrong.
> > >
> > >Thank you.
> > >
> > >Anthony
> > >
> > >---
> > >
> > >Improve your web design skills with these new books from Glasshaus.
> > >
> > >Usable Web Menus
> > >http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
> > >r-20
> > >Constructing Accessible Web Sites
> > >http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
> > >r-20
> > >Practical JavaScript for the Usable Web
> > >http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
> > >r-20
> >
> >
> >
> >
> > ---
> >
> > Improve your web design skills with these new books from Glasshaus.
> >
> > Usable Web Menus
> > http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
> > r-20
> > Constructing Accessible Web Sites
> > http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
> > r-20
> > Practical JavaScript for the Usable Web
> > http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
> > r-20
> >
> >
>
>
>
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20



  Return to Index