htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Discussion:
How could I add the onclick() action to textarea?


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


kenshieh
New User

Jan 24, 2005, 6:35 PM

Post #1 of 3 (2387 views)
Shortcut
How could I add the onclick() action to textarea? Can't Post

I have a problem about "add some action, like onclick() on <textarea> field".

Could anyone tell me how to do ?

It's a example about it.



<textarea id="test" onclick="alert('you click me')"></textarea>


<script type="text/javascript" src="/htmlarea/htmlarea.js"></script>
<script type="text/javascript" src="/htmlarea/dialog.js"></script>
<script tyle="text/javascript" src="/htmlarea/lang/ch.js"></script>
<script type="text/javascript" defer="1">
HTMLArea.replace(test');
</script>


But it didn't work. Could anyone tell me how to add this function ( onclick() ) into the textarea ? Thank you very much.


ross
Staff


Jan 26, 2005, 2:10 PM

Post #2 of 3 (2345 views)
Shortcut
Re: [kenshieh] How could I add the onclick() action to textarea? [In reply to] Can't Post

Hi Kenshieh.

Thanks for posting and welcome to the board!

I think what you are looking for is this:

<textarea onFocus="alert('you clicked on me');" onSelect="alert('you slected my text');">This is the text</textarea>

Could I get you to give that a shot? If it doesn’t get you going, you could take a look through this site:
http://www.comptechdoc.org/independent/web/cgi/javamanual/javatextarea.html.

It goes into more detail on the different types of events that can be handled in a text area Wink.
Cheers,
Ross Fairbairn - Product Specialist (in training)
support@interactivetools.com




kenshieh
New User

Jan 27, 2005, 9:22 PM

Post #3 of 3 (2322 views)
Shortcut
Re: [ross] How could I add the onclick() action to textarea? [In reply to] Can't Post

Hi ross, thanks for your reply.

But my problem is inserting some actions in <textarea> which was built by HTMLAREA 3.0.

As I saw some code in htmlarea.js, I found it replce the whole <textarea> and replace my onlick() action. Could you or anybody tell me how could I add some action in <textarea> built by HTMAREA 3.0?

Thank you very much.

 
 
 


Search for (options)