473,379 Members | 1,367 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

overwriting the doctype assigned

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
13 3523
romuse
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
8,658 Expert Mod 8TB
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
8,658 Expert Mod 8TB
Anyway of doing this from the html code? CSS? or javascript
neither of them.
____________
Dec 9 '09 #4
drhowarddrfine
7,435 Expert 4TB
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
romuse
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
8,658 Expert Mod 8TB
how do you know that the doctype causes this?
Dec 9 '09 #7
romuse
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
romuse
6
to add I'm trying to use the same media object that the examples linked reffer to
thanks
Dec 9 '09 #9
romuse
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
7,435 Expert 4TB
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
7,435 Expert 4TB
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
5,000 Expert 4TB
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
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

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

Similar topics

2
by: DartmanX | last post by:
I doubt this is possible, but I want to ask, just in case it is. I have a project going using Google Maps. This project spits out an HTML page template for people to post to their website and...
25
by: Viken Karaguesian | last post by:
Hello all, I'm somewhat of a newbie to webscripting. I've made a couple of websites in the past with WYSIWYG software, but now I'm much more interested in manual scripting. I have some...
19
by: tweak | last post by:
I have been messing around with buffers, and I found it peculiar that the code below will run without a segmentation fault. As far as I know, overwriting the allocated space from a call to...
9
by: jammie_linux | last post by:
Recently I came across a code which is quite similar to one shown below: #include <stdio.h> #include <string.h> typedef struct node { int data; int arr;
11
by: Steven Jones | last post by:
I have a C program that prints out two lines as follows: Line 1 Line 2 What I would like is for this program to sleep for one second, and then print out two more lines, overwriting the...
15
by: Lennart | last post by:
Hi folks, I have created an animated image gallery in dhtml. It works fine in Internet Explorer. In Firefox, it only works if I ommit the DOCTYPE tag. The page is valid xhtml-strict but with a...
0
drhowarddrfine
by: drhowarddrfine | last post by:
The Doctype or DTD Many coders get confused by all the talk of doctypes and how they affect browsers and the display of their web pages. This article will get right to the point about doctypes...
41
by: simonl | last post by:
Hi, I've been given the job of sorting out a crash in our product for which we have the crash information and an avi of the event (which can't possibly match but more of that later...) (btw this...
27
by: Jason | last post by:
Hi, I need to open an existing file, seek to a position at X number of bytes, and write out Y number of bytes overwriting any existing bytes, but no erasing any other data. Is this possible? ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.