homepage Welcome to WebmasterWorld Guest from 184.73.52.98
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
JavaScript Headache - a call for help!
Netscape won't dynamically write my HTML into a layer!
rycrostud




msg:1485713
 7:42 am on Jul 9, 2001 (gmt 0)

I've spent about three days writing a simple tree menu script which works perfectly. I'm now doing some final tweaks and placing the code into my finished page - but there is a problem. (Isn't there always?!)

I'll try and explain this as simply as I can:

I have a layer (div) that contains a bit of JavaScript. This script calls a function in the <head> that dynamically writes out the menu using a series of document.write commands. The problem is Netscape writes nothing (fine in IE on Mac and PC). This error only occurs when the code sits in a layer. It's fine in a table.

Does anyone know what could be going wrong? Is there a known problem with Netscape/Layers etc?

I've done a bit of debugging by placing an alert in the function - so I know that is being called. It seems to stop working when it gets to the first document.write.

Any advice would be greatly appreciated.

Cheers.

 

tedster




msg:1485714
 10:28 am on Jul 9, 2001 (gmt 0)

I seem to remember something about this. The workaround I remember is for document.write to actually write the DIV tag, instead of merely getting called from within the DIV.

Would this work in your case?

rycrostud




msg:1485715
 11:48 am on Jul 9, 2001 (gmt 0)

tedster - you truly are a star!!

Yes - the answer is to use JavaScript to write the div tags as well. Then netscape doesn't have a problem at all.

It took a bit of tweaking but got there in the end.

Many thanks

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved