Solved

Correct invalid doctype with js

Posted on 2011-03-11
3
442 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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

749 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