Here is a simplified example of what I'm trying to understand.
This works fine:
---------------------------------------------------------------------------
window.open(sURL1,'Window')
document.onreadystatechange = function()
{
if (document.readyState == 'complete')
{
alert('yo')
}
}
---------------------------------------------------------------------------
This never fires onreadystatechange:
---------------------------------------------------------------------------
window.open(sURL1,'Window')
document.location = sURL2
document.onreadystatechange = function()
{
if (document.readyState == 'complete')
{
alert('yo')
}
}
---------------------------------------------------------------------------
I've worked around it by doing:
---------------------------------------------------------------------------
window.open(sURL1,'Window')
window.close()
window.open(sURL2,'Window')
document.onreadystatechange = function()
{
if (document.readyState == 'complete')
{
alert('yo')
}
}
---------------------------------------------------------------------------
I would prefer just to navigate within the already open window (2nd
example), but just can't figure out how. Any help with this would be
extremely appreciated. Even an answer like "you can't do it the way you
want" would at least stop me from pulling my hair out.
Thanks,
Jeremy