D
Derek Erb
I am banging my head against the wall with this one. The following
code snippets work perfectly fine in MSIE6. But produce an error in
Firefox and do not work at all.
BROWSER.HTM
<HTML>
....
<div class="Abb">
<h2 id="ABTit">BROWSER</h2>
</div>
....
</HTML>
function MyFun() {
var aWin = window.open(strURL, 'BROWSERWIN',
"dependent=yes,menubar=no,resizable=yes,scrallbars=yes,toolbar=no,left=100,top=100,width=500,height=400");
aWin.document.getElementById('ABTit').innerHTML='MYTEXT';
}
My INDEX.HTM file calls the MyFun function which opens the BROWSER.HTM
file. The MyFun function is trying to modify the BROWSER.HTM window
contents and style.
In FireFox this produces the following error in the JavaScript Console
"aWin.document.getElementById("ABTit") has no properties".
I've seen that one before and normally it means I made a spelling error
somewhere... But this time it works fine in MSIE 6 and not in Firefox.
aWin.document.writeln("TESTING") works fine in both browsers.
I've tried various combinations and various web sites. I'm stumped...
Help!
code snippets work perfectly fine in MSIE6. But produce an error in
Firefox and do not work at all.
BROWSER.HTM
<HTML>
....
<div class="Abb">
<h2 id="ABTit">BROWSER</h2>
</div>
....
</HTML>
function MyFun() {
var aWin = window.open(strURL, 'BROWSERWIN',
"dependent=yes,menubar=no,resizable=yes,scrallbars=yes,toolbar=no,left=100,top=100,width=500,height=400");
aWin.document.getElementById('ABTit').innerHTML='MYTEXT';
}
My INDEX.HTM file calls the MyFun function which opens the BROWSER.HTM
file. The MyFun function is trying to modify the BROWSER.HTM window
contents and style.
In FireFox this produces the following error in the JavaScript Console
"aWin.document.getElementById("ABTit") has no properties".
I've seen that one before and normally it means I made a spelling error
somewhere... But this time it works fine in MSIE 6 and not in Firefox.
aWin.document.writeln("TESTING") works fine in both browsers.
I've tried various combinations and various web sites. I'm stumped...
Help!