TEENFRONT Posted August 23, 2009 Share Posted August 23, 2009 Hey guys I really, really need some help with this, iv been struggling all afternoon, writing bits of code, googling etc. So iv come to my fav place to try and tease some info from the gurus out there. The Situation I have a website that displays adverts, and rotates adverts currently through iframes with a meta refresh of the iframe. this rotates the adverts and reloads new adcodes. The Problem When we have decent adverts running that "expand" like "hover to watch trailer" the advert expands INSIDE the iframe and not ABOVE the iframe if that makes sense, so you dont see the advert actually expand. This is a BIG issue for the advertisers. Desperate Help Iv tried looking at ways to get inner iframe content to display "outside" of the iframe..but to no avail..so i atacked it from an ajax angle and tried to update a div on the main page with the advert codes, but because most ad codes are javascript themselves, it wont execute and wont update the div. Still, id need to update the div every x seconds to reload the adverts and show another one. The solution? Either id need a way to show inner iframe content outside of the iframe, or i need an ajax update div with javascript ad tags script every x seconds.. iframe fix option is preferable. i really look forward to any replies that anyone can offer me..i really am head butting the tabe right now... PS, i know this is not entirley php, but its a few things, ajax, javascript, php, html etc.. so apologies if this is better fit elsewhere but im familiar with the php love you guys give out lol. Link to comment https://forums.phpfreaks.com/topic/171519-php-ad-rotation-help/ Share on other sites More sharing options...
markwillis82 Posted August 23, 2009 Share Posted August 23, 2009 you could use an empty advert div: <div id="bannerad"></div> Then use jquery / ajax to call a php script which gets the appropriate ad, then uses .html feature of jquery to insert the retrieved html into the div, and then modify any css styles to suit that specific ad. Trying to adjust an iframe will get quick complicated I imagine. Hope this makes some sense Link to comment https://forums.phpfreaks.com/topic/171519-php-ad-rotation-help/#findComment-904498 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.