Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Depends on the time of year
    Posts
    478
    Thanks
    0
    Thanked 0 Times in 0 Posts

    disabling text fields/onblur

    Is there a way of disabling a text field (disabled) or using the onblur function without blurring the text within it?

    Thanks
    Duniyadnd

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Depends on the time of year
    Posts
    478
    Thanks
    0
    Thanked 0 Times in 0 Posts

    nevermind

    was doing it wrong...

    <input type="text" value="valuestuff" onchange="this.value='valuestuff';">

    Duniyadnd

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    A couple of other ways...

    <input type="text" value="valuestuff" readonly="true" />

    <input type="text" value="valuestuff" onchange="this.value=this.defaultValue" />
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •