Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Want to fill a form box2 automatically based on form box1 input [on the same page]

Reply
Thread Tools

Want to fill a form box2 automatically based on form box1 input [on the same page]

 
 
Matt MC
Guest
Posts: n/a
 
      05-19-2005
How would I put this together so,

<input name="input1" type="text">

<input name="input2" value="whatever is typed into input1" type="text">

I would like to be able to type something in input1, and see it type
into input2

 
Reply With Quote
 
 
 
 
RobB
Guest
Posts: n/a
 
      05-19-2005
Matt MC wrote:
> How would I put this together so,
>
> <input name="input1" type="text">
>
> <input name="input2" value="whatever is typed into input1"

type="text">
>
> I would like to be able to type something in input1, and see it type
> into input2


Assuming the same form....

<input
type="text"
name="input1"
value=""
onkeyup="this.form.input2.value=this.value">
<input
type="text"
name="input2"
value=""
readonly="readonly">

 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      05-25-2005
Matt MC wrote:

> How would I put this together so,
>
> <input name="input1" type="text">
>
> <input name="input2" value="whatever is typed into input1" type="text">
>
> I would like to be able to type something in input1, and see it type
> into input2


<input name="input1"
onkeyup="this.form.elements['input2'].value = this.value;"
onmouseup="this.onkeyup(event);">
<input name="input2" value="whatever is typed into input1">

You don't need to specify type="text", that's the initial value of the
attribute.


PointedEars
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
redirect and automatically fill out form and submit John Devlon ASP .Net 1 09-24-2009 11:56 AM
form input text in table; how to fill table cell space sdf HTML 3 12-06-2007 03:29 PM
options[box1.selectedIndex].value trouble Alexandre Jaquet Javascript 2 08-31-2005 12:40 AM
Want to fill a form box2 automatically based on form box1 input [on the same page] Matt MC HTML 2 05-25-2005 10:07 PM
Different user input boxes are automatically populated based on a value of the dropdown box. reneeccwest Javascript 2 07-11-2003 11:35 PM



Advertisments