Web Analytics Made Easy -
StatCounter textbox - CodingForum

Announcement

Collapse
No announcement yet.

textbox

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • textbox

    is there a javascript code for a locked text box?

    i use geocities and their text boxes dont lock text, meaning that if you are viewing it you can edit the text within.

  • #2
    With IE4+ and NS6 you simply use:

    document.FormName.ElementName.disabled=true;

    For older browsers you will have to make it so the box can't receive focus.

    Comment


    • #3
      thanks for the help, i was able to lock it

      however, i have another question

      is it possible to edit the font/style/size and background color of the text box?

      i only know a little html..

      Comment


      • #4
        it can be done, although i am not good with things like this.
        you can also lock a textbox by adding readonly into the textbox tag.


        scroots
        Spammers next time you spam me consider the implications:
        (1) that you will be persuaded by me(in a legitimate mannor)
        (2)It is worthless to you, when i have finished

        Comment


        • #5
          Code:
          <input type="textbox" style="BORDER: blue 2px solid; FONT-SIZE: large; BACKGROUND: skyblue; COLOR: red; FONT-FAMILY: cursive"></input>
          USA

          Comment

          Working...
          X