treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Google Chrome

  • Any one know why the .swf file is not showing up in Google Chrome?
    I also included an alt image, but that's not showing up either.

    http://www.abebuzz.com/
    Here's the code...
    <object width="620" height="256">

    <param name="movie" value="brand.swf"/>

    <embed src="<?php bloginfo('template_directory');?>/images/brand.swf" alt="brand.jpg"width="620"
    height="256">

    </embed>

    </object>
  • Try this


    <iframe src="/images/brand.swf" alt="brand.jpg" width="620" height="256">
  • Please don't ever use an iframe lol

    Seems to work for me - did you get it fixed?
  • Whats wrong with iframe?
  • Never use an iframe, especially if all your doing is displaying an image or flash video. Unless you're embedding something into the page, like a youtube video and you want to use html5 and not flash, or something of the like, there's not much other reason to use an iframe.
  • iframes are terrible and 99% of the time are not required. If you have a tag for a purpose - for example embed - you should always go with that, it will work because it's standard stuff and probably a path issue. There are many reasons why iframes are bad, from SEO to navigation, bookmarking and beyond... but that's something google can help people who want to find out more with :D

    Just know that iframes are not a thing of beauty or a joy forever - avoid at all costs.
  • I used an iframe when my HTML wouldn't validate with embedding it. An iframe was the only success I had.
  • I'm pretty sure there is a way to validate it without an iframe.

    If it worked on all browsers, why use an iframe specifically for validation? Validation is important, but you were just 'tricking' the validation system since that html still won't validate.

    My advice would be:
    A: Find a proper way of validating that HTML or link us to an example where it doesn't validate.
    B: Let the validation fail, it's not important in this case.
  • wow you should not be using iframe to make something validate, you should focus on getting the HTML right :)
  • It was actually the wufoo form. I changed code options from iframe to javascript. It passed. However, I have an "under construction" swf that I'm displaying that I put into an iframe because it wouldn't validate with embedding it. I'll post back when I recode it to the way it was for help.
  • Here is the link with the embed code that won't validate.

    LINK

  • <p><object width="650" height="320" type="application/x-shockwave-flash" data="/preview.swf">
    <param value="/preview.swf" name="movie">
    </object></p>

    Should work and validate
  • It worked and validated. Thanks a lot @heysep.