![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
This issue is driving me nuts and not able to figure out whats wrong. I've this code in my firefox extension. Firefox always hangs and reports the script is busy. if I introduce a break statement in the for(; loop below, thenno issue. Any help would be appreciated! function getStuff() { * * try * * { * * * * httpReq = new XMLHttpRequest(); * * * * httpReq.onreadystatechange = function(evt) * * * * { * * * * * * if (httpReq.readyState == 4) * * * * * * { * * * * * * * * if (httpReq.status == 200) * * * * * * * * { * * * * * * * * * * getList(httpReq.responseText); * * * * * * * * } * * * * * * } * * * * } * * * * httpReq.open("GET", "http://www.mysite.com", true); * * * * httpReq.send(null); * * }catch(ex) * * { * * * * Components.utils.reportError(ex); * * } } function getList(htmlText) { * * for(; ![]() * * { * * } }- Hide quoted text - - Show quoted text - |
#3
| |||
| |||
|
|
On Jun 12, 9:54 am, hiqu <hiqul... (AT) gmail (DOT) com> wrote: This issue is driving me nuts and not able to figure out whats wrong. I've this code in my firefox extension. Firefox always hangs and reports the script is busy. if I introduce a break statement in the for(; loop below, thenno issue. Any help would be appreciated! function getStuff() { try { httpReq = new XMLHttpRequest(); httpReq.onreadystatechange = function(evt) { if (httpReq.readyState == 4) { if (httpReq.status == 200) { getList(httpReq.responseText); } } } httpReq.open("GET", "http://www.mysite.com", true); httpReq.send(null); }catch(ex) { Components.utils.reportError(ex); } } function getList(htmlText) { for(; ![]() { } }- Hide quoted text - - Show quoted text - actually, let me post the correct code. I do some stuff in the for loop. |
#4
| |||
| |||
|
|
function getStuff() { try { httpReq = new XMLHttpRequest(); |
|
function getList(htmlText) { for(; ![]() { } } |
#5
| |||
| |||
|
|
This issue is driving me nuts and not able to figure out whats wrong. I've this code in my firefox extension. Firefox always hangs and reports the script is busy. if I introduce a break statement in the for(; loop below, thenno issue. snap function getList(htmlText) { for(; ![]() { } } The above is never ending loop, this is an equivalent of telling your |
#6
| |||
| |||
|
|
On Jun 12, 9:54 am, hiqu <hiqul... (AT) gmail (DOT) com> wrote: snap actually, let me post the correct code. I do some stuff in the for loop. |
![]() |
| Thread Tools | |
| Display Modes | |
| |