Guber-X Posted October 20, 2012 Share Posted October 20, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/269706-html5-best-alternative-to-iframe/ Share on other sites More sharing options...
requinix Posted October 20, 2012 Share Posted October 20, 2012 (edited) As bad as it sounds, a popup. One initiated by the user and not spawned automatically, of course. Edited October 20, 2012 by requinix Quote Link to comment https://forums.phpfreaks.com/topic/269706-html5-best-alternative-to-iframe/#findComment-1386528 Share on other sites More sharing options...
Guber-X Posted October 20, 2012 Author Share Posted October 20, 2012 Eww... Really popup is what you came up with... Hmmm maybe I should do some more digging Quote Link to comment https://forums.phpfreaks.com/topic/269706-html5-best-alternative-to-iframe/#findComment-1386534 Share on other sites More sharing options...
requinix Posted October 20, 2012 Share Posted October 20, 2012 Eww... Really popup is what you came up with... And you have any better ideas? You need something that will persist: frames and windows are the options available. And you said no frames. Quote Link to comment https://forums.phpfreaks.com/topic/269706-html5-best-alternative-to-iframe/#findComment-1386536 Share on other sites More sharing options...
Guber-X Posted October 20, 2012 Author Share Posted October 20, 2012 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 thanx for the suggestion though Quote Link to comment https://forums.phpfreaks.com/topic/269706-html5-best-alternative-to-iframe/#findComment-1386542 Share on other sites More sharing options...
kicken Posted October 20, 2012 Share Posted October 20, 2012 <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. Quote Link to comment https://forums.phpfreaks.com/topic/269706-html5-best-alternative-to-iframe/#findComment-1386543 Share on other sites More sharing options...
Guber-X Posted October 20, 2012 Author Share Posted October 20, 2012 (edited) "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 October 20, 2012 by Guber-X Quote Link to comment https://forums.phpfreaks.com/topic/269706-html5-best-alternative-to-iframe/#findComment-1386637 Share on other sites More sharing options...
Christian F. Posted October 20, 2012 Share Posted October 20, 2012 Tried pressing F5 yet? Quote Link to comment https://forums.phpfreaks.com/topic/269706-html5-best-alternative-to-iframe/#findComment-1386649 Share on other sites More sharing options...
Guber-X Posted October 20, 2012 Author Share Posted October 20, 2012 Tried pressing F5 yet? What would refreshing the page have to do with what I ask? Quote Link to comment https://forums.phpfreaks.com/topic/269706-html5-best-alternative-to-iframe/#findComment-1386668 Share on other sites More sharing options...
requinix Posted October 20, 2012 Share Posted October 20, 2012 What would refreshing the page have to do with what I ask? Okay, if you don't understand that, then try clicking a link to a different page. Quote Link to comment https://forums.phpfreaks.com/topic/269706-html5-best-alternative-to-iframe/#findComment-1386672 Share on other sites More sharing options...
Guber-X Posted October 21, 2012 Author Share Posted October 21, 2012 well of course F5 will stop my music player. using my menu links to view different content does not stop my music play using <object> tag. also works the same with <iframe> tag Quote Link to comment https://forums.phpfreaks.com/topic/269706-html5-best-alternative-to-iframe/#findComment-1386684 Share on other sites More sharing options...
Guber-X Posted October 21, 2012 Author Share Posted October 21, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/269706-html5-best-alternative-to-iframe/#findComment-1386688 Share on other sites More sharing options...
kicken Posted October 21, 2012 Share Posted October 21, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/269706-html5-best-alternative-to-iframe/#findComment-1386689 Share on other sites More sharing options...
Guber-X Posted October 21, 2012 Author Share Posted October 21, 2012 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. yeah, thanx for the help. the link you had is very simular to what i have already Quote Link to comment https://forums.phpfreaks.com/topic/269706-html5-best-alternative-to-iframe/#findComment-1386752 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.