Solved

Correct invalid doctype with js

Posted on 2011-03-11
3
434 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
  • 2
3 Comments
 
LVL 29

Expert Comment

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

Author Comment

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

Accepted Solution

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

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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 the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now