Jump to content

Html5 Best Alternative To Iframe


Guber-X

Recommended Posts

Im trying to figure out the best way to switch content when menu options are selected. I have a media player that I want to continuously play when navigating the website. With iframe I am limited with options for it. Using PHP still reloads the page therefore stopping the music play.

 

The "iframe" will hold the main content for the page

 

I just would like to see what people have to suggest for a better alternative for what I'm trying to do.

Link to comment
Share on other sites

i was saying the <iframe> tag was not a option... lol, so far i think <object> tag seems to be the best suited for what im looking for. just trying to work out some kinks with other things that don't involve with this topic anymore :P

 

thanx for the suggestion though

Link to comment
Share on other sites

<object> isn't going to help you as far as reloading the page interrupting the music. The only way to handle that is to popup a separate music player as requinix said. That your ajax-ify the entire site so that you never actually reload the page and just swap a div content.

Link to comment
Share on other sites

"object" seems to be working fine so far, if I was to use "iframe" is there a way to set height and width by percentage in html5 and css3. Cuz by from what I read from w3schools is that "iframe" does not support height and width percentage in html5... Would it work in css3?

 

I can't test it right now, at work for the next 6 hours

Link to comment
Share on other sites

okay, well for what i was trying to do I seem to have figured it out, and works in IE, FF and Chrome. im using the tag <object>. basicly my "index" page has the main code for the media player and the <object> box. the rest of the content will be displayed inside the <object> page. if you would like to see a sample of how i put it together, just pm me and ill give you a link to the page

Link to comment
Share on other sites

If your using an object tag to display HTML (like this) that is effectively the same as using an iframe. You may as well use an iframe in such a case for better browser compatibility and ease of use.

 

As for this question:

if I was to use "iframe" is there a way to set height and width by percentage in html5 and css3.

 

Yes, you can set a width and height on your iframe to a percentage using CSS. You can do that with pretty much any element.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.