JavaScript Development
 
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 ForumsWeb DesignJavaScript Development

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 August 2nd, 2001, 05:24 PM
Beettlle Beettlle is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: Colombia
Posts: 2 Beettlle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Javascript and Textareas

I have a page where I log everything that I do when I get into the office. But there is some stuff that I'm beginning to find that I write in on a daily basis. I was thinking that it would make my life easier if I would make a drop down menu with what I always write, so I can choose it, and then write the stuff that changes every day. So waht I want to do is something like what they have here, when you post. A drop down menu that, when I click on one of the options it adds it to the textarea. I kinda think about it as concatinating, or something of the sort. I have no idea about Javascript but a friend told me it would be perfect for the job. Any and all help is GREATLY aprecceated..

Thanks, =)

Reply With Quote
  #2  
Old August 3rd, 2001, 09:35 AM
dang65 dang65 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: Wilmslow, Cheshire
Posts: 255 dang65 User rank is Corporal (100 - 500 Reputation Level)dang65 User rank is Corporal (100 - 500 Reputation Level)dang65 User rank is Corporal (100 - 500 Reputation Level)dang65 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 5 m 57 sec
Reputation Power: 17
Just adapt this. Should do the trick.

<SCRIPT LANGUAGE="javascript">
<!--
function addTheUsualStuff() {
document.forms.dailyLog.dailyEntry.value += document.forms.usualStuff.theUsualStuff.value
}
//-->
</SCRIPT>


<FORM ACTION="whatever" METHOD="POST" ID="dailyLog" NAME="dailyLog">

<TEXTAREA COLS="80" ROWS="5" NAME="dailyEntry" ID="dailyEntry">Add daily log here</TEXTAREA>

</FORM>

<FORM ACTION="" METHOD="POST" ID="usualStuff" NAME="usualStuff">

<SELECT NAME="theUsualStuff" ID="theUsualStuff">
<OPTION VALUE="Got out of bed">Got out of bed</OPTION>
<OPTION VALUE="Had some coffee">Had some coffee</OPTION>
<OPTION VALUE="Wrote diary">Wrote diary</OPTION>
</SELECT>

<INPUT TYPE="BUTTON" VALUE="Add the usual stuff" onClick="addTheUsualStuff()">

</FORM>

Reply With Quote
  #3  
Old August 3rd, 2001, 12:19 PM
Beettlle Beettlle is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: Colombia
Posts: 2 Beettlle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking Thanks

Thanks a lot for the help! The scrip is just waht I needed,

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Javascript and Textareas

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