Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Feb 2005
    Posts
    113
    Thanks
    6
    Thanked 0 Times in 0 Posts

    XHTML Validation Errors

    Hello,

    I'm trying my hardest to clean up the code on my wife's photography blog. I designed it, and now am going back and fixing XHTML and CSS errors.

    My problem is, I can't figure out what's causing the first XHTML error in he W3C validator. It says:

    Line 103, Column 46: document type does not allow element "div" here
    var contentString = '<div id="map_bubble">'+

    It seems to maybe have some sort of issue with the quotation marks? Just a guess though.

    Any help would be greatly appreciated! here's the URL: http://www.whitehillphotography.com/blog/

    I know there are more errors, but I'm trying to start at the top and work down.

    Thanks!
    http://www.whitehillphotography.com - Murfreesboro, TN Photographer

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Move the script to an external file or just add CDATA comments inside your script tag, like
    Code:
    <script type="text/javascript">
    /* <![CDATA[ */
    // content of your Javascript goes here
    /* ]]> */
    </script>
    See http://javascript.about.com/library/blxhtml.htm
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder
    Join Date
    Feb 2005
    Posts
    113
    Thanks
    6
    Thanked 0 Times in 0 Posts
    That did it! Thanks! Onto the rest of the errors...
    http://www.whitehillphotography.com - Murfreesboro, TN Photographer

  • #4
    Regular Coder
    Join Date
    Feb 2005
    Posts
    113
    Thanks
    6
    Thanked 0 Times in 0 Posts
    OK, I'm down to only 1 error (from 64!)... but again, I'm stuck. If someone wouldn't mind running my page through the validator and giving me any insight, I'd be very appreciative!

    http://www.whitehillphotography.com/blog/

    the one error is:

    Line 345, Column 358: there is no attribute "allowTransparency"
    …no" frameborder="0" allowTransparency="true" style="padding: 0px 0px; border:n…


    But there are multiple instances of that on the page, and this is the only one that cause an error. Any help?
    Last edited by brett7481; 05-11-2010 at 01:54 AM.
    http://www.whitehillphotography.com - Murfreesboro, TN Photographer

  • #5
    Regular Coder
    Join Date
    Feb 2005
    Posts
    113
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Anyone with some thoughts on that one error?

    I've figured out that it only appears on the top most post. Some I'm guessing it's something going on above it that makes it think that that is an error? I just can't find it.
    http://www.whitehillphotography.com - Murfreesboro, TN Photographer

  • #6
    Senior Coder
    Join Date
    Oct 2005
    Posts
    1,340
    Thanks
    0
    Thanked 61 Times in 60 Posts
    Probably cause there is no such thing in HTML as "allowTransparency" no matter how many times you have it on that page.

  • #7
    Regular Coder
    Join Date
    Feb 2005
    Posts
    113
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Wow... uber helpful drhowarddrfine, thanks!

    But since that didn't really help too much let me rephrase my question:

    Why would it not error for every instance on a page then? Why only the first instance?

    And, apparently IE needs that bit of code. I guess it's a Microsoft Extension of HTML.

    So, I guess my question needs to turn into, how can I get it to validate and still make it display properly in IE?
    http://www.whitehillphotography.com - Murfreesboro, TN Photographer

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    allowTransparency is only there once, in the code for the iframe. There are a few alternatives, one requires you to use javascript by using document.getElementById along with setAttribute. You could also use down level revealed comments along with conditional comments.
    Code:
    <div class="facebook_like_button">
    <!--[if IE]>
    <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.whitehillphotography.com%2Fblog%2F2010%2F05%2Fmurfreesboro-photographer-senior-rep-eva%2F&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="padding: 0px 0px; border:none; overflow:hidden; width:450px; height:70px;"></iframe>
    <![endif]-->
    <!--[if !IE]>-->
    <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.whitehillphotography.com%2Fblog%2F2010%2F05%2Fmurfreesboro-photographer-senior-rep-eva%2F&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" style="padding: 0px 0px; border:none; overflow:hidden; width:450px; height:70px;"></iframe>
    <!--<![endif]-->
    </div>
    That will show the iframe without allowtransparency as an attribute to any browser but IE. In turn it will also allow it to validate although I really don't see this as being a big issue. Also we are trying to help you. No need to get snippy about any help you receive. drhowardfine was just telling you why it wasn't valid. Its not a valid attribute. It was made by microsoft to allow the backgrounds of iframes to show up.
    Last edited by _Aerospace_Eng_; 05-12-2010 at 05:38 AM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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