views:

199

answers:

1

Hi guys, I'm writing a plugin for TinyMCE, and I want to have ListBox B dependent on what's selected in Listbox A. I can make it so the initial selection in ListBox A fills ListBox B, but I cannot make a second selection, wipe ListBox B clean, and fill ListBox B with the new items.

I've tried using just Native ListBoxes and JQuery functions but JQuery can't find them on the page.

Thanks!

A: 

Hi Mike, TinyMCE creates an iframe to hold the content it's editing, so the list boxes you're searching for are in there rather than in the main document. You can use the tinymce.get('editor_id').getDoc() function to retrieve the document from the iframe (see http://tinymce.ephox.com/documentation/api/index.html#class_tinymce.Editor.html-getDoc). If you target your standard JQuery functions on that document it should work.

Regards,

Adrian Sutton.
http://tinymce.ephox.com

ajsutton