I'm not fully clear on what you are trying to do. However, when pollC fires, comments (green) will never be executed:
Code:
function pollC(id, load){
if (!load&&document.getElementById(id)){
document.getElementById(id).id='';
return;
}
else if (load&&document.getElementById(id)){
if (id=='unique_1') //optional
//startList(); //required
return;
}
else if (load&&!document.getElementById(id))
setTimeout("pollC('"+id+"', 'load')", 60);
}
I think what you want is:
Code:
function pollC(id, load){
if (!load&&document.getElementById(id)){
document.getElementById(id).id='';
return;
}
else if (load&&document.getElementById(id)){
//if (id=='unique_1') //optional
startList(); //required
return;
}
else if (load&&!document.getElementById(id))
setTimeout("pollC('"+id+"', 'load')", 60);
}
If only one onload event is being spoofed and only one id is ever tested for, testing for the specific id(s) is not required. But, for the function that was onload to fire, it cannot be commented out.
Bookmarks