By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,480 Members | 1,229 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,480 IT Pros & Developers. It's quick & easy.

overwriting the doctype assigned

P: 6
Hello everyone,
I hope that my post is in the proper location and in all cases your comments feedback will be appreciated
When I create an html page lanch it (contains flash object) it works fine in both direfox and IE
I use domino server application to import those pages and by default the following is added
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >

if I add my own doctype it's gone and the one assigned by the domi no engine is always the one added to the page

my question is: how to overwrite the doctype added after the import to something like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
Witch is what I want to use...

so in simpler terms...
I have a webpage created...it could have any doctype or none...when I imported the following is assigned:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >
How to overwrite with anothor value eg: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"

Anyway of doing this from the html code? CSS? or javascript

thanks
Dec 9 '09 #1
Share this Question
Share on Google+
13 Replies


P: 6
Hello everyone,
I hope that my post is in the proper location and in all cases your comments feedback will be appreciated
When I create an html page launch it (contains flash object) it works fine in both firefox and IE
I use domino server application to import those pages and by default the following is added
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >

if I add my own doctype it's gone and the one assigned by the domino engine is always the one added to the page

my question is: how to overwrite the doctype added after the import to something like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
Witch is what I want to use...

so in simpler terms...
I have a webpage created...it could have any doctype or none...when I imported the following is assigned:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >
How to overwrite with anothor value eg: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"

Anyway of doing this using javascript or any other poirposal....

thanks
Dec 9 '09 #2

Dormilich
Expert Mod 5K+
P: 8,639
as far as I know the DOM provides readonly access to the DTD.

but what good would a DTD replacement bring after the document was loaded (more or less)?

to make sense, you have to do the replacement on the server side or maybe provide a DTD from the start.

and I donít see why you would need HTML 4.0 over HTML 4.01.
Dec 9 '09 #3

Dormilich
Expert Mod 5K+
P: 8,639
Anyway of doing this from the html code? CSS? or javascript
neither of them.
____________
Dec 9 '09 #4

drhowarddrfine
Expert 5K+
P: 7,435
Without control of the server, as Dormilich said, you can't change it but are you sure this is what you want to do? The doctype you want to change it to would put browsers into quirks mode. If you meant the 4.01 version, then the only thing you'd gain is keeping browsers in standards mode rather than "almost standards" mode which only affects tables.
Dec 9 '09 #5

P: 6
Hi and thanks for the reply...
Actually I think that I wasn't clear and what I typed was confusing,,,,,
Quickr place sitting on top of domino
Quickr has a form that assigns the Doctype automaticly to any web resource:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >

in one of the pages I have a flash object that ends up been cut (only on firefox and on IE it works fine)

Now my problem is:
For firefix to work the doctype specified doesn't work properly
How can I specify on the form where the doctype is specified a different doctype if firefix is used and kee[p the default one for IE
example:
if browser is FF
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
Else
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >

not used that much to html my background is C++
so was wondering what can be done.
thanks
Dec 9 '09 #6

Dormilich
Expert Mod 5K+
P: 8,639
how do you know that the doctype causes this?
Dec 9 '09 #7

P: 6
yes defenitly...cause I can try the html page without importing it in to quickr domino...with doctype I see the behavious without doctype I don't see the behaviour....someone has already reported the problem and he has posted examples...if you use firefox and check the 2 examples one using the dotype and other not using it
quirks mode version is at: http://www.sr-images.co.uk/galleries/Scotland/index.php

standards mode version is: http://www.sr-images.co.uk/galleries...ndardsmode.php

only difference between the files is presence of doctype on the first line.
Dec 9 '09 #8

P: 6
to add I'm trying to use the same media object that the examples linked reffer to
thanks
Dec 9 '09 #9

P: 6
so to summirise...domino adds the following to any webform:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >
this doesn't allow the object (previous links) to work properly on firefox (object cut)

using only:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
fixes the problem for firefox but the object isn't working properly on IE!!

so is their a way to use both of them depending on the browser type?
hope the picture is clear now
thanks
Dec 9 '09 #10

drhowarddrfine
Expert 5K+
P: 7,435
This is double posted in the html forum. Please do not double post.

The answer is no, you cannot change the doctype. The reason the two are different because you are comparing quirks mode to standards mode and never the twain shall meet. IE specifically has serious issues in quirks mode.

There are javascript engines for IE that change its behavior so it acts like more modern browsers but I don't know how much the doctype used affects this. I'll look into it.
Dec 9 '09 #11

drhowarddrfine
Expert 5K+
P: 7,435
Dean Edwards' IE7-js library may do what you want but I don't know how it plays with IE8. It's IE you will want to fix in all this, as usual.
Dec 9 '09 #12

RedSon
Expert 5K+
P: 5,000
Threads merged...

This new merge tool leaves a bit to be desired. If there are any problems with the merge of these two threads one of the experts or moderators can PM me.
Dec 9 '09 #13

P: 6
As of Domino 7.0.2 there is a new field that allows you to set the doctype on a form basis. Just add a computed for display field called $$HTMLFrontMatter, with a formula as you need...e.g.

"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">" + @NewLine
Dec 12 '09 #14

Post your reply

Sign in to post your reply or Sign up for a free account.