Read only pop up

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AMT India
    New Member
    • Feb 2007
    • 64

    Read only pop up

    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?
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    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.

    Comment

    • gits
      Recognized Expert Moderator Expert
      • May 2007
      • 5388

      #3
      Originally posted by 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?
      yes ... you may loop through your input-elements and set the disabled-attribute for them:

      [CODE=html]
      <input type="button" value="test" disabled=""/>
      [/CODE]

      it only has to be set ... if you want the elements enabled you have to remove the attribute.

      kind regards ...

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5388

        #4
        Originally posted by dmjpro
        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 ...

        Comment

        • AMT India
          New Member
          • Feb 2007
          • 64

          #5
          Thanx for all replies

          Comment

          Working...