English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a website using CSS to get a common style for all the pages. Now on one page I have javascript elements and document.write statements. The statements work but I notice that none of my CSS "stuff" like the background image or whatever loads on this page. It's like using javascript has invalidated my use of CSS. I have searched the web to find what I am doing wrong but can't find anything. So far the only thing I have is a reference to my CSS file in the"link" tag within the head section, just as in all my pages. Then for this page in the head section I also have a script section where I define my javascript functions. Then the body is blank except for something like where loadXMLDoc is the name of my first function. Any thoughts or help

2006-10-18 16:17:24 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

The easiest way for you to see what's actually going on is to get the Web Developer extension for Firefox - https://addons.mozilla.org/firefox/60/ (You are using Firefox, aren't you?)

Web Developer is absolutely indispensible for the kind of troubleshooting you're facing. For one thing, it lets you edit a page's CSS on the fly and see the results.

But the really big feature in your situation is that under the 'View Source' menu is a function called 'View Generated Source' that shows you a picture of the page's source as seen by the browser at the moment. In other words, it has the results of all those document.write statements that have been executed in your Javascript code, not just the code itself.

My guess is that as soon as you see that, the problem will become obvious. I hope this helps.

2006-10-18 17:08:17 · answer #1 · answered by Anonymous · 0 0

It would probably be helpful if you could link the code...

2006-10-18 16:21:12 · answer #2 · answered by CHEVICK_1776 4 · 0 0

fedest.com, questions and answers