Disable a text box & still allow scrolling?

Discussion in 'HTML' started by harry, Aug 1, 2004.

  1. harry

    harry Guest

    some data I have is quite a bit longer than the displayed text box length,
    some users can only view this data but set the disabled/readonly attribute
    prevents focus on the field so you can't scroll!

    is this possible to allow focus & scrolling but without any editing? -

    thanks

    harry
     
    harry, Aug 1, 2004
    #1
    1. Advertising

  2. "harry" <> wrote:

    > is this possible to allow focus & scrolling but without any editing?


    You can use CSS to display text in a scrollable box, with no editing.

    The Doormouse

    --
    The Doormouse cannot be reached by e-mail without her permission.
     
    The Doormouse, Aug 1, 2004
    #2
    1. Advertising

  3. harry

    harry Guest

    any ideas as to how I would do this?

    thanks again - sorry but not the most experienced in CSS!

    "The Doormouse" <> wrote in message
    news:Xns95387459ED904doormouseattnet@68.12.19.6...
    > "harry" <> wrote:
    >
    > > is this possible to allow focus & scrolling but without any editing?

    >
    > You can use CSS to display text in a scrollable box, with no editing.
    >
    > The Doormouse
    >
    > --
    > The Doormouse cannot be reached by e-mail without her permission.
     
    harry, Aug 1, 2004
    #3
  4. harry

    harry Guest

    all I was trying to do was to have a read only text box that could receive
    focus & the user can use the arrow/home/end keys to view all the contents -
    why is even the simplest of things always so difficult with web app's?


    "harry" <> wrote in message
    news:jDaPc.12598$...
    > any ideas as to how I would do this?
    >
    > thanks again - sorry but not the most experienced in CSS!
    >
    > "The Doormouse" <> wrote in message
    > news:Xns95387459ED904doormouseattnet@68.12.19.6...
    > > "harry" <> wrote:
    > >
    > > > is this possible to allow focus & scrolling but without any editing?

    > >
    > > You can use CSS to display text in a scrollable box, with no editing.
    > >
    > > The Doormouse
    > >
    > > --
    > > The Doormouse cannot be reached by e-mail without her permission.

    >
    >
     
    harry, Aug 1, 2004
    #4
  5. harry

    Toby Inkster Guest

    harry wrote:

    > any ideas as to how I would do this?


    <div style="height:4em;width:20em;padding:0.5em;margin:0.5em;border:1px
    solid black;overflow:auto;">
    But I must explain to you how all this mistaken idea of denouncing
    pleasure and praising pain was born and I will give you a complete account
    of the system, and expound the actual teachings of the great explorer of
    the truth, the master-builder of human happiness. No one rejects,
    dislikes, or avoids pleasure itself, because it is pleasure, but because
    those who do not know how to pursue pleasure rationally encounter
    consequences that are extremely painful. Nor again is there anyone who
    loves or pursues or desires to obtain pain of itself, because it is pain,
    but because occasionally circumstances occur in which toil and pain can
    procure him some great pleasure. To take a trivial example, which of us
    ever undertakes laborious physical exercise, except to obtain some
    advantage from it? But who has any right to find fault with a man who
    chooses to enjoy a pleasure that has no annoying consequences, or one who
    avoids a pain that produces no resultant pleasure?
    </div>

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Aug 1, 2004
    #5
  6. harry

    Adrienne Guest

    Gazing into my crystal ball I observed "harry" <> writing in
    news:KXaPc.12609$:

    Top posting fixed - please do not top post in the future

    > "harry" <> wrote in message
    > news:jDaPc.12598$...
    >> "The Doormouse" <> wrote in message
    >> news:Xns95387459ED904doormouseattnet@68.12.19.6...
    >> > "harry" <> wrote:
    >> >
    >> > > is this possible to allow focus & scrolling but without any
    >> > > editing?
    >> >
    >> > You can use CSS to display text in a scrollable box, with no
    >> > editing.
    >> >
    >> > The Doormouse
    >> >

    >> any ideas as to how I would do this?
    >>
    >> thanks again - sorry but not the most experienced in CSS!


    Easily remedied. Have a look at http://www.w3schools.com/css/default.asp

    Also http://www.blooberry.com/indexdot/css/propindex/position.htm might be
    of help.

    > all I was trying to do was to have a read only text box that could
    > receive focus & the user can use the arrow/home/end keys to view all
    > the contents - why is even the simplest of things always so difficult
    > with web app's?
    >
    >


    Is the document in question a form? If not you should not be using a form
    element to do this. If it is, however, a form, then you can do
    <textarea rows="5" cols="10" readonly name="textarea">This is some readonly
    text that will be readonly and the user can scroll, and will also be
    submitted with the form.</textarea>

    http://www.w3.org/TR/html4/interact/forms.html#edef-TEXTAREA

    --
    Adrienne Boswell
    Please respond to the group so others can share
    http://www.arbpen.com
     
    Adrienne, Aug 1, 2004
    #6
    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. Gnarlodious
    Replies:
    4
    Views:
    17,623
    elizas
    May 5, 2010
  2. Big McLargehuge

    Please help me create a scrolling text box

    Big McLargehuge, Nov 5, 2005, in forum: HTML
    Replies:
    19
    Views:
    1,211
    Edwin van der Vaart
    Nov 10, 2005
  3. Jeff
    Replies:
    2
    Views:
    962
    clintonG
    Sep 19, 2006
  4. Ryan Taylor
    Replies:
    1
    Views:
    693
    Ryan Taylor
    Sep 9, 2004
  5. Jim

    Check box and text box disable

    Jim, Jun 3, 2004, in forum: Javascript
    Replies:
    3
    Views:
    123
    Randy Webb
    Jun 4, 2004
Loading...

Share This Page