Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AJAX calls and TinyMCE

Status
Not open for further replies.

waiterm

Programmer
May 17, 2004
236
GB
Hi,

I am loading content into two divs on a page using Ajax, one page contains a textarea that I want to make a TinyMCE WYSIWYG editor. Basically the TinyMCE initialisation script isn't waiting for the other two pages to load before it runs. Therefore sometimes it works and sometimes it doesn't. The problem only occurs in IE and works perfectly in Firefox.

Any suggestions on how I can force the 3 procedures to execute in the right order in IE would be greatly appreciated.

Or if there is another means of initialising TinyMCE from within the second div.

Rob Waite
 
How are you executing the scripts right now?

You could try a window.onload handler, which initializes the TinyMCE interface. After the interface initialization is complete, hand off to a ajax-style function that handles loading the one text area. Once readyState == 4 and status==200, fire the next ajax call to load the other text area.

Or, synchronous calls would work as well ... but then it's not Ajax. ;)

I mostly use FCKEditor now, and love the php integration. :)

Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top