Hi folks,
I basically customized
http://www.blog.valenticabd.com/tag/javascript
custom combo box code.
Everything works great in I.E.
When the following initliazed function is called
I perform a ajax call to a php page to grab menu items from a database.
// Initialize the Month Combo var monthCombo = function (name) { this.Name = name; var xht = getHttpRequest(); xht.open("POST", 'plugins/monthcombo/getMenuItems.php', true); xht.setRequestHeader('Content-type','application/x-www-form-urlencoded'); xht.onreadystatechange = callback_myPages; var objStr = ""; xht.send(objStr); }
If anyone has run ajax calls you know on the onreadystatechange function is called several times during the process
until a 200 status is returned. This is all fine and good and exactly how things should work. The problem
I am having with firefox is my plugin doesn't wait for the return and never puts the items in the combo box.
If i put an alert call right after my xht.send above it will be populated properly.
So my question is this. Does anyone know how to use a wait, timeout, or pause. I've already tried setTimeOut and
my own custom loop to wait X seconds. The former doesn't do any good and the later causes the plugin not to load.
I'm sort of scratching my head here.
J
Re: FCKToolbarSpecialCombo AJAX call not working in FF
That isn't really a question about FCKeditor, you should create a simple testcase (just the request without anything else) and ask this in a forum dedicated to Firefox like http://forums.mozillazine.org/viewforum ... =d&start=0