471,857 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,857 software developers and data experts.

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 1391
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
reply views Thread by YellowAndGreen | last post: by
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.