Reply
Code Insertion
Old 06-21-2005, 08:48 PM Code Insertion
mikeroq's Avatar
Skilled Talker

Posts: 92
Name: Mike Roq
Location: Lakewood, CO
Ok when you click on smilies, what would the code be to add the code into a text area
__________________
CodingHub.com
mikeroquemore.com
mikeroq is offline
Reply With Quote
View Public Profile Visit mikeroq's homepage!
 
When You Register, These Ads Go Away!
Old 06-22-2005, 04:22 AM
chrishirst's Avatar
Super Moderator

Latest Blog Post:
Am I impressed or what?
Posts: 14,899
Location: Blackpool. UK
I use this
Code:
function AddText(NewCode) {
	if (document.thisform.details.createTextRange && document.thisform.details.caretPos) {
		var caretPos = document.thisform.details.caretPos;
		caretPos.text = NewCode;
	} else {
		document.thisform.details.value+=NewCode;
	}
	document.thisform.details.focus();
}
The form is called "thisform" and the textarea is called "details"

to call the function use

AddText("text to insert");
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Code Insertion
 

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

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




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11143 seconds with 12 queries