Solved

Correct invalid doctype with js

Posted on 2011-03-11
3
444 Views
Last Modified: 2012-05-11
I have a script called in a page that generates a div with "position: fixed" (implemented in explorer even before IE7) but it doesn't work because the page doesn't have a doctype, it ignores the position:fixed.
There is a way to set the doctype with javascript?... even "rough" solutions are accepted ;)
(document.doctype is readonly!)

An example page without a doctype is this
http://support.microsoft.com/kb/214081
0
Comment
Question by:LAMASE
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 29

Expert Comment

by:Badotz
ID: 35108893
Wht don't you just add a DOCTYPE to the page?
0
 
LVL 4

Author Comment

by:LAMASE
ID: 35113511
obviously i can't control the page, only the js ;)
0
 
LVL 29

Accepted Solution

by:
Badotz earned 500 total points
ID: 35113663
Obviously, some things are not possible ;-)
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question