This is killing me ... document.write problem.

They have: 15 posts

Joined: Sep 2001

Check this out: gosrr.com

I'm having a problem getting the secondary nav when you click on the Services rollover to load without crashing the browser(IE5,6). I know this is absolutely crazy... but this script calls a function in the main frame, which calls the script in the frame "black". The script in the frame black called servicesNav looks like this:

function serviceNav() {
document.open("text/html");

document.writeln("Stout | Risius | Ross");
document.writeln("");
document.writeln("<script src=\'rollovers.js\' type=\'text/javascript\' language=\'JavaScript\'></script>");
document.writeln("");
document.writeln("");
document.writeln("");
document.writeln("");
document.writeln("");
document.writeln("");
document.writeln("");
document.writeln("");
document.writeln("");
document.writeln("");
document.writeln("vnbvnvbn");
document.writeln("");
document.writeln(" ");
document.writeln("");
document.writeln("");
document.writeln(" ");
document.writeln("");
document.writeln("");
document.writeln(" ");
document.writeln("");
document.writeln("");
document.writeln(" ");
document.writeln("");
document.writeln("");
document.writeln(" ");
document.writeln("");
document.writeln("");
document.writeln("");
document.writeln("");

//document.close();
return false;
}

I have commented out the document.open, and close because they seem to be causing the crash... with them commented out the script doesn't crash, but it loads a blank page instead of writing the intended content. ... Here's another strange thing... when you go forward a page, then go back, the intended HTML is showing as it should.

Please help... been screwing with this all day to no avail.

Paul A. Baugher - Director
Digital Skyline Studios
http://www.digitalskyline.com

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi pbaugher,

Went to the site, hit the "Services" link, and got "object doesn't support this method...line 14" error message. So, what I would like to know is:

what is line 14 in:

1) the frame where the link is located, and/or
2) the frame where the function is located, and/or
3) the js file being called

Vinny

In all likelihood, the error is a typo, something like --
document.writein instead of document.writeln

Vinny

Where the world once stood
the blades of grass cut me still

They have: 15 posts

Joined: Sep 2001

Well lets see, I get a forbidden error in NS3, No errors in ns 4.7, No errors in ns6, No reported error in ie6, but the problem I described exists. The problem you have, not sure on the browser you used, but in IE6, when you click the services link after the blank page appears in the black frame (click twice), you get the error you mentioned, because the script is no longer present in the frame.

I'm still lost as to what could be the cause. Your suggestion of typo, is of course still possible, but highly unlikely, I have checked the code carefully, plus the fact that there are still no errors in Netscape. (that I'm aware of).

I'm still looking for an answer so hopefully someone here has an idea!?!?

PS. If you wondering why I'm not just loading an html doc in to that frame, well... it's what the client requested... They don't want the "flash" that occurs when you load another file (occurs on dialup/slow connections)... and they also don't want to use DHTML or Flash... so this was the only possible solution I could think of, it should work... but it looks like a javascript interpretation error in the browser.

Paul A. Baugher - Director
Digital Skyline Studios
http://www.digitalskyline.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.