To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > ClientSide Technologies

ClientSide Technologies Discuss HTML/CSS/Javascript, and any other client-side technologies, here.

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-05-2006, 12:14 AM   #1
NZ_Kiwis
Senior Member
 
Join Date: Apr 2005
Posts: 699
Click a link and add a code to my texzt area

I want a code which will add "[20339]" to my text area once I click on it!!!

does someone have a basic code for this?
NZ_Kiwis is offline   Reply With Quote
Old 04-05-2006, 03:23 PM   #2
esukf
Senior Member
 
Join Date: Apr 2006
Posts: 174
HTML Code:
<script type="text/javascript">
function addtext(txt) {
  	document.form1.textareafield.value = document.form1.textareafield.value + txt;
  	document.form1.textareafield.focus();
  	return true;
 }
</script>
<form name="form1">
<textarea name="textareafield" cols="40" rows="5"></textarea>
</form>

<a href="javascript:void(0)" onclick="addtext('[20339]')">Add [20339]</a>
esukf is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 12:50 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.