Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 15th, 2012, 10:25 PM
jsnewbie5574 jsnewbie5574 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 2 jsnewbie5574 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 52 sec
Reputation Power: 0
New JavaScript Programmer Need assistance with textboxes

Please Help..
I need to pass user inputted values from a textbox and append into a textarea using the onClick event. The user should also have the ability to remove the value they have already added.

All appended values would then be submitted into a database.

Can someone please tell me how to go about writing this script?

Reply With Quote
  #2  
Old September 17th, 2012, 08:20 AM
ManiacDan's Avatar
ManiacDan ManiacDan is offline
Likely to be eaten by a grue.
Dev Shed God 10th Plane (9500 - 9999 posts)
 
Join Date: Oct 2006
Location: Pennsylvania, USA
Posts: 9,791 ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)  Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Months 3 Weeks 14 h 53 m 20 sec
Reputation Power: 6112
Your professor or TA can help you get started on this.
__________________
HEY! YOU! Read the New User Guide and Forum Rules

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

Reply With Quote
  #3  
Old September 24th, 2012, 09:19 PM
jsnewbie5574 jsnewbie5574 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 2 jsnewbie5574 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 52 sec
Reputation Power: 0
1st issue resolved. I now need to know how to removes lines from a textarea with a bu

I have the first part of my script working where I can append new lines to the textarea from a regular input box via button, but I need to be able to remove one or more lines of text from the textarea when selected with a second button.

Can someone help me out with this? I'm sure I'm missing something really simple here.

Here is my code:




[CODE

<!-- This function works //-->
<script language="javascript" type="text/javascript">
function addtext() {
var newtext = document.myform.inputtext.value;
document.myform.outputtext.value += newtext + "\n";
}

<!--This function doesn't work //->

function removeText()
{
var oldtext=document.getElementById("outputtext");
document.myform.outputtext.value.removeChild(textarea.childNodes[0]);

}



</script>



<form name="myform">
<table width="495" border="0" cellpadding="5" cellspacing="0"><tr>
<td width="167" rowspan="2" valign="bottom"><input type=text name="inputtext"></td>

<td width="133" height="63" valign="middle"></p>
<input type="button" value="Add Category" onClick="addtext();"></td>
<td width="165" rowspan="2"><textarea name="outputtext" rows="6"></textarea></td>
</tr>
<tr>
<td valign="top"><input type="button" name="Reset" id="Reset" value="Reset Categories" onClick="removetext();"></td>
</tr>[/CODE]

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > New JavaScript Programmer Need assistance with textboxes

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap