function getSuggestionFromDB(sURL) { var arrResults = new Array(); var objResult; var myAjax = new Ajax.Request( sURL, { method: 'get', asynchronous: 'false', onComplete: function(showResponse) { var resp= showResponse.responseText; var arrSuggestions=resp.split (","); var i; if(arrSuggestions.length ==1 && arrSuggestions [0].replace(/^\s+/,"").length ==0) { return; } for(i=0;i<arrSuggestions.length;i++) { objResult = {}; objResult.id = arrSuggestions[i]; objResult.text = arrSuggestions[i]; arrResults[i] = objResult; } } }); <TIME_DELAY_HERE> return arrResults; }
1. Here the sURL successfully return 'comma separated values' 2. The above code works fine in IE 6 & IE 7 3. In IE 8, arrResults are returned as empty. 4. An <TIME_DELAY_HERE> ( alert() or manual time delay ) shows up arrResults with correct values. Is there are workaround to get this working in IE 8? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---