if (window.parent.frames['scripts1']) {
if (window.parent.frames['scripts1'].document.documentElement) {
var strSCRIPT = window.parent.frames['scripts1'].document.documentElement.textContent;
if ((strSCRIPT.lastIndexOf('bbbbEND') - strSCRIPT.length) != -7) {
window.parent.frames['scripts1'].document.location.href = 'test1.txt?refresh=' + Date();
}
} else {
window.parent.frames['scripts1'].document.location.href = 'test1.txt?refresh=' + Date();
}
}
I have tried lot of things but not success in writing something for cross browser.
Here’s some jQuery conceptual material to get you started:
Keep in mind this important fact: Your frame is loaded after the parent document is finalized which means that the ready() function will be executed before the frame is loaded. If you try to access your frame in your ready() function, most likely you will get nothing because it’s not been loaded yet — i.e., it’s race condition.