|
-
Sep 10th, 2003, 10:09 AM
#1
Thread Starter
Addicted Member
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.
-
Sep 10th, 2003, 10:31 AM
#2
Frenzied Member
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
-
Sep 10th, 2003, 11:10 AM
#3
Thread Starter
Addicted Member
(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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|