Jump to content

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
https://forums.phpfreaks.com/topic/269706-html5-best-alternative-to-iframe/
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

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

"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

Edited by Guber-X

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

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.