Click to See Complete Forum and Search --> : link that wraps HTML tags around selected text in TEXTAREA window


flapjack50
01-09-2004, 09:27 AM
I am trying to create a hyperlink that when selected will wrap bold tags around text that the user has highlighted within a TEXTAREA form element. I have tried a few snippets of Javascript code from the web but continually run into issues. The form name is "post_form" and the TEXTAREA box is named "text". Does anyone have some sample code on how to do this (I scrapped what I have so far, it wasn't worth troubleshooting). Blogger does this when posting a new blog entry but I can't quite figure out how they do it.

Thanks in advance for any and all help that you might be able to offer.

requestcode
01-09-2004, 11:30 AM
Check this link out:
http://www.codingforums.com/showthread.php?s=&threadid=12235

It might be of help.

flapjack50
01-09-2004, 03:06 PM
Originally posted by requestcode
Check this link out:
http://www.codingforums.com/showthread.php?s=&threadid=12235

It might be of help.

Thanks for the link, I think their discussions have detered me enough to do this another way. I think I will have the buttons create a Javascript prompt window that will ask the user to type in the text they want bolded then it will insert it where the cursor is. That seems to be the way this threaded discussion software works when you submit (or reply) to a thread.

Thanks!

Pittimann
01-10-2004, 06:19 AM
Hi!

Why not integrate a browser detection and make it a prompt only for non-IE users?

Cheers - Pit