overwriting the doctype assigned

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • romuse
    New Member
    • Dec 2009
    • 6

    overwriting the doctype assigned

    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
  • romuse
    New Member
    • Dec 2009
    • 6

    #2
    overwriting doctype?

    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

    Comment

    • Dormilich
      Recognized Expert Expert
      • Aug 2008
      • 8694

      #3
      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.

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        Anyway of doing this from the html code? CSS? or javascript
        neither of them.
        ____________

        Comment

        • drhowarddrfine
          Recognized Expert Expert
          • Sep 2006
          • 7434

          #5
          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.

          Comment

          • romuse
            New Member
            • Dec 2009
            • 6

            #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

            Comment

            • Dormilich
              Recognized Expert Expert
              • Aug 2008
              • 8694

              #7
              how do you know that the doctype causes this?

              Comment

              • romuse
                New Member
                • Dec 2009
                • 6

                #8
                yes defenitly...cau se 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....so meone 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.

                Comment

                • romuse
                  New Member
                  • Dec 2009
                  • 6

                  #9
                  to add I'm trying to use the same media object that the examples linked reffer to
                  thanks

                  Comment

                  • romuse
                    New Member
                    • Dec 2009
                    • 6

                    #10
                    so to summirise...dom ino 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

                    Comment

                    • drhowarddrfine
                      Recognized Expert Expert
                      • Sep 2006
                      • 7434

                      #11
                      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.

                      Comment

                      • drhowarddrfine
                        Recognized Expert Expert
                        • Sep 2006
                        • 7434

                        #12
                        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.

                        Comment

                        • RedSon
                          Recognized Expert Expert
                          • Jan 2007
                          • 4980

                          #13
                          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.

                          Comment

                          • ianhobson
                            New Member
                            • Jul 2007
                            • 6

                            #14
                            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 $$HTMLFrontMatt er, 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

                            Comment

                            Working...