readonly

Discussion in 'HTML' started by Jeff Thies, Jun 29, 2004.

  1. Jeff Thies

    Jeff Thies Guest

    I'd like to set a checkbox to be readonly (this will be done server side
    with CGI.pm).

    I thought I could do this:

    <input readonly="readonly" ...>

    but this is also readonly:

    <input readonly="" ...>

    Is there a way to set readonly with an attribute pair, Or does the presence
    of the string readonly make the only difference?

    Jeff
    Jeff Thies, Jun 29, 2004
    #1
    1. Advertising

  2. Jeff Thies wrote:

    > Is there a way to set readonly with an attribute pair, Or does the presence
    > of the string readonly make the only difference?


    These two should work:

    <input readonly="readonly" ...>
    <input readonly ...>

    in HTML, but only the former in XHTML. It's a SHORTTAGS feature.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Jun 29, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. andrei

    Readonly checkbox in Datagrid

    andrei, Jul 30, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    594
    andrei
    Jul 30, 2003
  2. Learning SQL Server
    Replies:
    2
    Views:
    2,463
    Learning SQL Server
    Aug 7, 2003
  3. doug albright
    Replies:
    0
    Views:
    461
    doug albright
    Aug 30, 2003
  4. Dave Wurtz

    PropertyGrid - ReadOnly

    Dave Wurtz, Nov 13, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,827
    Dave Wurtz
    Nov 14, 2003
  5. Jonathan Hyatt
    Replies:
    1
    Views:
    1,867
    Jonathan Hyatt
    Jun 8, 2004
Loading...

Share This Page