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 5 of 5

Thread: Input

  1. #1
    Regular Coder
    Join Date
    Oct 2006
    Location
    Spain
    Posts
    147
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Input

    Hi,


    I have an INPUT like this:

    <input type="text" size="15" name="look_for2" value="*****" >

    The value "******" is necessary . I need have my form INPUT with something, however I need change it with something always I enter a data.

    Do you know how I do this?

    Thanks

    Lebron

  • #2
    Senior Coder
    Join Date
    Nov 2006
    Posts
    1,000
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't understand what you are trying to do. Typically the user is the one that changes an input textbox. Are you saying you need to set a default value to it or something? If so, you want to do it when the page loads or some other time?

    david_kw

  • #3
    Regular Coder
    Join Date
    Oct 2006
    Location
    Spain
    Posts
    147
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Yes.

    I need to have a default valuein the input box. When the user return to original page, the default value it shown automatically.

    Thank you

    Lebron

  • #4
    Senior Coder
    Join Date
    Nov 2006
    Posts
    1,000
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can set it in the onload function.

    window.onload = function () {
    document.f.look_for2.value = oldvalue; // however you get your old value
    }

    <form name="f">
    <input type="text" size="15" name="look_for2" value="*****" />
    </form>

    david_kw

  • #5
    Regular Coder
    Join Date
    Mar 2006
    Posts
    728
    Thanks
    35
    Thanked 132 Times in 123 Posts
    <input type="text" size="15" name="look_for2" value="*****" defaultValue="*****" />


  •  

    Posting Permissions

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