Results 1 to 8 of 8

Thread: Need DOCTYPE workaround

  1. #1
    Join Date
    Feb 2009
    Posts
    3
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Need DOCTYPE workaround

    1) Script Title: ddaccordion.js

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...daccordion.htm


    3) Describe problem: I am using menu a site for which i have no control over the DOCTYPE . It is a Monster Commerce shopping site and the control the doctype. Unfortunately they left out the 2nd http part, making it invalid and making my menu flicker. You can check it out on my demo site.

    First with doctype as assigned by Monster (flickers in IE) =
    http://www.crinv.com/accordionTest.html

    and with valid DOCTYPE (no flicker)=
    http://www.crinv.com/accordionTestGood.html

    So my question. Is there anyway around this since i cannot change the DOCTYPE itself?

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Twey View Post
    Sure about that Twey? The working document has the same (I imagine error corrected by the browser) errors. I think this flickering is only an issue in one or more versions of IE when it is thrown into quirks mode.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. The Following User Says Thank You to jscheuer1 For This Useful Post:

    bluetick (02-24-2009)

  5. #4
    Join Date
    Feb 2009
    Posts
    3
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    I know it has many problems, on the validation front, but for the moment i really only care if it works in IE, which it does just fine when i replace the doctype as i did on http://www.crinv.com/accordionTestGood.html (everything else same) . I think i will still get flicker even with errors fixed unless i can change the doctype (by some back way) , or force IE into standards compliance mode some other way. Am i wrong there?

    I will revise it and try to get it to validate...unless you think it is a waste of time due to the doctype issue?

    thanks.
    Last edited by bluetick; 02-23-2009 at 07:21 PM. Reason: adding

  6. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I don't think it's possible to work around it, no. Writing valid HTML might cause it to consider it valid, but really you should be complaining to the IE developers. That's a perfectly valid DOCTYPE, but IE doesn't seem to recognise it as one.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. The Following User Says Thank You to Twey For This Useful Post:

    bluetick (02-23-2009)

  8. #6
    Join Date
    Feb 2009
    Posts
    3
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default here is validated page. same probs.

    Yah, Its an IE problem really, i realize now. (unfortunately i don't think they'll listen to me) .

    Anyway here is pages that validated.

    with Monster assigned DOCTYPE =
    http://www.crinv.com/accordionTestMo...typeClean.html

    and with IE recognized DOCTYPE=
    http://www.crinv.com/accordionTestGoodClean.html


    Same deal Flickers on 1st not on 2nd. I seem to be stuck between IE and Monster.

    Is there no trick to make it work?
    Somehow use javascript to insert a line before the DOCTYPE or something, or if could just add the http part to end of DOCTYPE ?
    Use doument.write to create new page with new doctype and old page contents? hmm...

  9. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I don't think so, no. By the time it gets to your code, IE has already seen the DOCTYPE and decided in what mode it's going to parse the page.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. The Following User Says Thank You to Twey For This Useful Post:

    bluetick (02-23-2009)

  11. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Twey View Post
    I don't think so, no. By the time it gets to your code, IE has already seen the DOCTYPE and decided in what mode it's going to parse the page.
    Geez, I come up with the reason, you get all the thanks. Couldn't happen to a nicer person (you) though.

    I tend to agree, how can you change the DOCTYPE after it's parsed? Javascript seems inadequate to the task. The only thing I can think of, and I tend to doubt that this exists, but since there is a meta tag:

    Code:
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
    to get IE 8 to act like IE 7, perhaps there is/are other IE specific meta tags, in fact there are (the one that disables the galleryimg (<META HTTP-EQUIV="imagetoolbar" CONTENT="no">) functionality for all images on a page, others that enable enter page and leave page transitions), but I mean one that might help in this case . . .

    However, a cursory Googling of the subject tends to indicate none for this purpose. But the MS knowledge base might have an answer (be it with meta data or otherwise), it's just rather tedious to sift through, and not always very clear about the exact circumstances and/or contraindications of a given implementation.
    Last edited by jscheuer1; 02-24-2009 at 12:55 AM. Reason: add a bit about the MS knowledge base
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  12. The Following 2 Users Say Thank You to jscheuer1 For This Useful Post:

    bluetick (02-24-2009),Twey (02-24-2009)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •