?
Solved

Correct invalid doctype with js

Posted on 2011-03-11
3
Medium Priority
?
448 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
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 2000 total points
ID: 35113663
Obviously, some things are not possible ;-)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

850 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