469,315 Members | 1,568 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,315 developers. It's quick & easy.

Read only pop up

AMT India
I have a pop up window made in JS. There is a lot of buttons and text boxes in that pop up. I want to make this whole pop up read only. Is there is any method in Java script?
May 23 '07 #1
4 1363
dmjpro
2,476 2GB
this is very simple .....

u can do this by enable the readonly attribute of all fields.
say .. <input type = text readonly>

i think this ll work for u.

kind regards.
dmjpro.
May 23 '07 #2
gits
5,390 Expert Mod 4TB
I have a pop up window made in JS. There is a lot of buttons and text boxes in that pop up. I want to make this whole pop up read only. Is there is any method in Java script?
yes ... you may loop through your input-elements and set the disabled-attribute for them:

Expand|Select|Wrap|Line Numbers
  1. <input type="button" value="test" disabled=""/>
  2.  
it only has to be set ... if you want the elements enabled you have to remove the attribute.

kind regards ...
May 23 '07 #3
gits
5,390 Expert Mod 4TB
this is very simple .....

u can do this by enable the readonly attribute of all fields.
say .. <input type = text readonly>

i think this ll work for u.

kind regards.
dmjpro.
this works in IE and for text-boxes only - looks a little bit different to disabled and allows the user to select and copy the text in the box ... while disabled does not ... but readonly seems not to work in moz, ff ...?

kind regards ...
May 23 '07 #4
Thanx for all replies
May 25 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Gunnar | last post: by
11 posts views Thread by Markus Breuer | last post: by
12 posts views Thread by Steven T. Hatton | last post: by
2 posts views Thread by Sandman | last post: by
4 posts views Thread by Ollie Cook | last post: by
8 posts views Thread by a | last post: by
1 post views Thread by Jose Reckoner | last post: by
6 posts views Thread by arnuld | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.