Document.Write in firefox



Hi all,

got a strange problem with some code..
I have a frameset that is generated by the code below, and when
surfing to index.htm it works fine in both firefox and IE.

When surfing directly to a "subpage" it opens the frameset as it
should in IE and almost as it should in Firefox.
Except that in Firefox the frame wbasket isn't loaded (Just empty
html). If I press F5 the basket frame is shown as it should. Any ideas
on hos to fix this?

<SCRIPT LANGUAGE="JavaScript">
<!--
defaultsubpage="default.aspx";
if (location.search) {subpage=location.search.substring(1)}
else {subpage=defaultsubpage}

if (subpage.indexOf('&&&')>=0) {
prefix=subpage.substring(0,subpage.indexOf('&&&'))+"://";
suffix=subpage.substring(subpage.indexOf('&&&')+3,subpage.length);
subpage=prefix+suffix;
}
else
{
subpage='default.aspx';
}
document.write('<frameset cols="949,*" frameborder="NO" border="0"
framespacing="0">');
document.write('<frameset rows="111,*,40" frameborder="NO" border="0"
framespacing="0">');
document.write('<frame src="top.aspx" name="wtop" scrolling="NO"
noresize >');
document.write('<frameset cols="182,*" frameborder="NO" border="0"
framespacing="0">');
document.write('<frame style="padding-top:0px; margin:0px;"
src="menu.aspx" name="wmeny" scrolling="NO" noresize>');
document.write('<frame src="'+subpage+'" name="wmain" id="wmain"
scrolling=auto>');
document.write('</frameset>');
document.write('<frame src="cart.aspx" name="wbasket" id="wbasket"
scrolling="NO" noresize>');
document.write('</frameset>');
document.write('<frame src="empty.htm" name="wempty" scrolling="NO"
noresize >');
document.write('</frameset>');
// -->
</SCRIPT>

.



Relevant Pages

  • Re: Javascript and Firefox 1.5
    ... But why have I got problems with Firefox ... The HTML is junk. ... It is a frameset or does the document have a body? ... and so it loads the contatore.js which does a document.write, ...
    (comp.lang.javascript)
  • Re: Numeric CSS class - Firefox complains but Opera OK
    ... Firefox raised an error on a page in my frameset: ... Ruleset ignored due to bad selector." ... I could find no relevant documentation or newsgroup comment on this ...
    (alt.html)
  • Numeric CSS class - Firefox complains but Opera OK
    ... For the record (in case anyone in future hits the same problem): ... Firefox raised an error on a page in my frameset: ... Ruleset ignored due to bad selector." ...
    (alt.html)
  • Re: Is this one of those scams?
    ... > Surfing with Firefox is like wearing suspenders and a belt. ... The pants that those belt and suspenders are holding up might have big holes ...
    (rec.outdoors.rv-travel)
  • Re: Is this one of those scams?
    ... >> Surfing with Firefox is like wearing suspenders and a belt. ...
    (rec.outdoors.rv-travel)