Uneditable

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shelly

    Uneditable

    Here is a simple one. How do you make a text field uneditable?

    Shelly


  • Samuel

    #2
    Re: Uneditable

    <input type="text" readonly>, if I recall correctly.

    Comment

    • DJ Craig

      #3
      Re: Uneditable

      *
      <input type="text" readonly="reado nly" />
      W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.


      Comment

      • upperhacker@gmail.com

        #4
        Re: Uneditable

        <input type="text" disabled value="TEXT HERE!"> That will also work.

        Comment

        • Geoff Berrow

          #5
          Re: Uneditable

          I noticed that Message-ID:
          <1121797325.226 503.222920@g14g 2000cwa.googleg roups.com> from
          upperhacker@gma il.com contained the following:
          [color=blue]
          ><input type="text" disabled value="TEXT HERE!"> That will also work.[/color]

          Excuse me, but what's the point of a text box that you can't edit? Why
          not just echo the value to the screen?
          --
          Geoff Berrow (put thecat out to email)
          It's only Usenet, no one dies.
          My opinions, not the committee's, mine.
          Simple RFDs http://www.ckdog.co.uk/rfdmaker/

          Comment

          • Chung Leong

            #6
            Re: Uneditable

            Keep in mind that a the value of a disabled field doesn't get posted on
            submit where as a that of a readonly field does. Disabling a textarea
            also disables its scroll-bar(s).

            Comment

            • Chung Leong

              #7
              Re: Uneditable

              It's a way to show the user that something on-screen was editable but
              no longer is.

              Comment

              • Shelly

                #8
                Re: Uneditable


                "Geoff Berrow" <blthecat@ckdog .co.uk> wrote in message
                news:g5kqd1dckn 1h0vsjgo07v4ut0 io1dl6s8q@4ax.c om...[color=blue]
                >I noticed that Message-ID:
                > <1121797325.226 503.222920@g14g 2000cwa.googleg roups.com> from
                > upperhacker@gma il.com contained the following:
                >[color=green]
                >><input type="text" disabled value="TEXT HERE!"> That will also work.[/color]
                >
                > Excuse me, but what's the point of a text box that you can't edit? Why
                > not just echo the value to the screen?[/color]

                Example: I create an internal "mail form". I preset the destination and
                the sender. I don't want those changed in any way as they are going to and
                from usernames. I want the "Send To:" and "From:" to look like text boxes
                since the "Subject:" is a text box (and the message is a text area).

                It is just aesthetics.

                Shelly


                Comment

                • SOR

                  #9
                  Re: Uneditable

                  <comp.lang.ph p , Geoff Berrow , blthecat@ckdog. co.uk>
                  <g5kqd1dckn1h0v sjgo07v4ut0io1d l6s8q@4ax.com>
                  <Tue, 19 Jul 2005 20:13:38 +0100>
                  [color=blue][color=green]
                  > ><input type="text" disabled value="TEXT HERE!"> That will also work.[/color]
                  >
                  > Excuse me, but what's the point of a text box that you can't edit? Why
                  > not just echo the value to the screen?
                  >[/color]

                  Must thank shelly for asking the question as I wanted to know that .

                  I have a use for a text box you cant edit on
                  www.phpguestbook.co.uk/phpgb_sign_guestbook.php for the anti bot
                  security code .

                  Just a quick method of displaying and passing both the security code and
                  the typed in answer .

                  Well you did ask :-)

                  Comment

                  • Geoff Berrow

                    #10
                    Re: Uneditable

                    I noticed that Message-ID:
                    <MPG.1d4a429b86 846dad989d44@no-cancel.newsread er.com> from SOR contained
                    the following:

                    [color=blue]
                    >I have a use for a text box you cant edit on
                    >www.phpguestbook.co.uk/phpgb_sign_guestbook.php for the anti bot
                    >security code .
                    >
                    >Just a quick method of displaying and passing both the security code and
                    >the typed in answer .
                    >
                    >Well you did ask :-)[/color]

                    Yes, but why does it have to be in a text box?

                    --
                    Geoff Berrow (put thecat out to email)
                    It's only Usenet, no one dies.
                    My opinions, not the committee's, mine.
                    Simple RFDs http://www.ckdog.co.uk/rfdmaker/

                    Comment

                    Working...