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



in IE, my javascript iframe is shown when a user clicks a button. In firefox, however, it does not show. When I delete the above code, the iframe shows, but some of the fonts become larger. How do I fix this??

2007-02-14 03:54:54 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design






3 hours ago

2007-02-14 03:55:18 · update #1

2007-02-14 03:55:43 · update #2

2 answers

Document.all is non-standard; use document.getElementById() instead. When you delete the doctype, the browser goes into quirks mode. So you get both non-standard rendering of fonts and acceptance of some non-standard code.

2007-02-14 05:26:29 · answer #1 · answered by injanier 7 · 1 0

Inserting a DOCTYPE into a document is the correct way to code a standards compliant webpage. Internet Explorer uses the presence of a DOCTYPE to determine whether to display pages in a proper standards compliant manner or not. Which is the cause of the problem.

I suggest writing better Javascript. If all you want to do is have a button which shows or hides the iframe then there is a better way of doing it. Try this:

Give the