49 users online (1 members and 48 guests)  

Thread: input help


  Results 1 to 2 of 2

Related

  1. Replies: 15
  2. Get the querystring into input box    Forum: Javascript Forum
    Replies: 1
  3. Help with input script    Forum: Website Scripts Forum
    Replies: 13
  1. #1
    marcelomogi's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2002
    Location
    Brazil
    Posts
    2

    Question input help

    Hi,

    IŽd like to do a form that contains 1 button and 1 'input type=text' and when I click the button, it writes its value inside the input text box.

    Thanks!

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hiya, welcome to the forums.

    try this code -

    If I understood what you need correctly this will work. Its just a bodge, tho. If this is a serious thing you are doing you may want to make it into a js function to make it portable. let me know if you need it.
    Code:
    <form method="post" name="myform">
    <input type="text" name="mytextbox" size=10>
    <input type="button" onclick="passme=this.value;document.myform.mytextbox.value=passme;" value="Transfer me">
    </form>
    edit:moved code to bottom so it does not interfere with the front page.
    Last edited by HTML; 07-23-2002 at 02:11 PM.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread