Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Adding text from one text box to another using a different button.

Featured Replies

Hey, doing a quick project for my work and can only use html / css etc. No server sided business.

 

Basically i need a textbox that has a button next to it that when clicked, will add the value of the textbox to another text area.

 

So its like this:

 

<INPUT TYPE="text" class="systeminput" NAME="insert" VALUE="";">
			<INPUT TYPE="button" class="button" NAME="insert" VALUE="Add Entertainment System" onClick="this.form.textarea1.value=this.form.textarea1.value+??????;">

The question marks is the point where i do not know how to pull the value written into the text box.

 

Any help?

 

Hey Lovelock,

 

Pure JavaScript solution:

 

<input type="text" id="myText" name="myText" />
<input type="button" value=" Go! " onclick="document.getElementById('myTextarea').value=document.getElementById('myText').value" />
<textarea id="myTextarea"></textarea>

 

Link to Example: http://jsfiddle.net/5h69j/

 

 

Update: jQuery version: http://jsfiddle.net/5h69j/1/

Edited by Lyndsey
added jQuery version


<html>
<body>

<form name="f">

<INPUT TYPE="text" class="systeminput" NAME="t" VALUE=""><br>
<INPUT TYPE="button" class="button" VALUE="Add Entertainment System" onClick="f.ta.value=f.t.value;"><br>
<textarea name="ta"></textarea>

</form>

</body>
</html>

Edited by Lyndsey

Sorry, Lindsey, when I sent my message, I did not see the yours one.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.