Results 1 to 3 of 3

Thread: textbox(Resolved)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    140

    textbox(Resolved)

    I have two text boxes in a Webpage,
    Is it possible that If a user types a data in the first text box, it automatically appears the same data in the 2nd textbox?
    Please help!
    thanks in advance.
    Last edited by neoprem; Sep 10th, 2003 at 11:14 AM.

  2. #2
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    you'll need to have some kind of event that activates the copying of the text like a button.

    you can do it on the client side or server side...client would be better if you want it instantly.

    something like this
    Code:
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <script>
    function CopyText()
    {
    	if(form1.text1.value != "") {
    		form1.text2.value = form1.text1.value
    	}
    }
    </script>
    </head>
    
    <body>
    <form name="form1" method="post" action="">
     Text1: <input type="text" name="text1"><br><br>
     Text2: <input type="text" name="text2"><br><br>
     <input name="submit" type="button" value="submit" onClick="CopyText();">
    </form>
    </body>
    </html>
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    140

    (RESOLVED)

    Thanks a lot!
    Memnoch1207 for your help
    Thank you!

Posting Permissions

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



Click Here to Expand Forum to Full Width