Closed Thread Icon

Preserved Topic: CSS: how to make an input uneditable. Pages that link to <a href="https://ozoneasylum.com/backlink?for=18038" title="Pages that link to Preserved Topic: CSS: how to make an input uneditable." rel="nofollow" >Preserved Topic: CSS: how to make an input uneditable.\

 
Author Thread
GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 07-20-2001 13:52

what's the property of an inputfield to make it uneditable?
<input type=text style="editable:no; ????">

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 07-20-2001 16:00

i made something like that!.

Hey...don't laugh at me or my site ist das okay?

Anyway, what I done is not protable at all...but I like it! (use IE4+)

also check my recent post: http://www.ozoneasylum.com/Forum2/HTML/000838.html

[This message has been edited by lallous (edited 07-20-2001).]

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 07-20-2001 17:54

That isn't done with CSS... You should add "READONLY" parameter, like this:

<INPUT TYPE="text" VALUE="bla bla" READONLY>

BTW This doesn't work in NN4.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-20-2001 17:55

Readonly? I remember once using "disabled" - maybe readonly doesn't grey it out.

Try both. Remember they won't work in NN4. In that, you can use visibility=hidden if you're desperate, probably.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 07-20-2001 18:13

Yes, there's also a DISABLED parameter, and it will grey out the input field...

<INPUT> tag reference

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 07-20-2001 18:16

What would one do to DYNAMICALLY set the READONLY?

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-20-2001 18:46

Wow, I'm drawing this knowledge from, I think, the second javascript program I ever wrote... (see "Gladiator" in http://www.karl.nu/slime/original/games.html , but this disabled button thing we're talking about has been removed since I started the game, like, 2 years ago. Woah, almost 3. Eesh.)

I'm pretty sure document.myform.textboxname.disabled = true; worked, in IE at least.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 07-20-2001 19:13

<FORM NAME="maxForm"><INPUT TYPE="text" VALUE="bla bla bla" NAME="maxInput"></FORM>

// readonly
document.maxForm.maxInput.readOnly = true; // "readOnly" part is case-sensitive!

// disable
document.maxForm.maxInput.disabled = true;

BTW Dynamically changing readonly & disabled state is not possible in Opera 5.

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 07-21-2001 09:09

thanks guys! it also worked with the attribute
EDITABLE



« BackwardsOnwards »

Show Forum Drop Down Menu