Just be wary that not all browsers will honor the readonly flag (Netscape 4
for example).

In looking at this I found a tutorial at
http://www.estek.net/estek/idocs/forms/_INPUT_DISABLED.html .  I tested it
in IE 6, NS 7.02 and Opera 7.  None of these browsers prevented me from
checking and unchecking the box.  Only the DISABLED flag does.  Readonly
apparently prevents the user from altering the value of the input field.


-----Original Message-----
From: Tim Burden [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 11:25 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Checkbox


Just using the readonly flag in the input tag is the easiest method, I
think.

----- Original Message -----
From: "Reuben D. Budiardja" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: "CPT John W. Holmes" <[EMAIL PROTECTED]>; "shaun"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, March 26, 2003 2:26 PM
Subject: Re: [PHP] Checkbox


On Wednesday 26 March 2003 02:11 pm, CPT John W. Holmes wrote:
> >On Wednesday 26 March 2003 01:43 pm, CPT John W. Holmes wrote:
> > > > is it possible to have a checkbox that if it is specified to be
> checked
> > > > when the page is being formulated then it cannot be unchecked?
> > >
> > > No. No... No.
> > >
> > > If you already know you don't want it to be unchecked, then don't show
> > > a checkbox. That's why we have PHP, so you can create your page
> DYNAMICALLY
> > > and not show bits and pieces when you don't need to.
> >
> > Although that is theoretically correct, there can be some reason why one
> would
> > want to display a checkbox anyway. Sometimes it can be clearer for the
> user> > to see the GUI, asthetic reason, etc, etc.

> True. In that case, though, I would just show an image of a checked check
> box. The end result will be the same to the user, they will just think
it's
> a checkbox they cannot uncheck.

But isn't it so much easier to type in that one line HTML + javascript than
trying to get an image of a checked check box...... unless you have that
handy, you'd have to eg. take a snapshot, or draw something, then save the
file as an image file.......hmm...

and as you said, the effect will be the same to the user anyway....

RDB


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to