Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Strut2 JQuery TinyMCE

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all. I am using jquery to display TinyMCE in my Struts2 application. It works well. Now that I am trying to add some javascript to my implementation of a textarea which renders TinyMCE, I find that the 'onclick', 'onselect', 'onkeyup' does not work properly.

To be more specific: I am using an HTML 'select' element to display a set of options to the user. They can select one of these options, click another HTML element 'button' and copy what they selected from the HTML 'select' element into the TinyMCE-enabled 'textarea'. However, the user must set the cursor position in the 'textarea' before they can copy from the 'select' element. I am using javascript to capture the cursor position in the textarea to enable the user to copy from the select element. Here is the javascript:


When I implement this as plain HTML, it works fine. However, when I use this in conjunction with the jquery implementation of TinyMCE in Struts2, the call to 'onclick=storeCaret(this)', 'onselect=storeCaret(this)', 'onkeyup=storeCaret(this)' does not work.

Here is my Struts 2 JSP implementation:



Could someone please advise regarding this issue: why the call to 'storeCaret()' is not being made?

Thanks in advance.
 
reply
    Bookmark Topic Watch Topic
  • New Topic