[RESOLVED] iframe problem
I have a weird problem. I hope somebody can help me here.
This code works in FF - Chrome - Opera - Safari but not in IE 9 and IE 10
This code works in IE 9 and IE 10 but not in FF - Chrome - Opera - Safari
$_SESSION['url'] = "http://www.domainname.com/404.php";
$taal = (substr($lang, 0, 2));
<iframe src="<?php echo $_SESSION['url'] ?>?taal=<?php echo $taal ?>" name="inline_frame" id="inline_frame"
width="100%" height="100%" frameborder="0" marginwidth="0" scrolling="no" allowTransparency="true" >
Is there a way to make it work in all browsers with only one code ?
<iframe src="http://www.domainname.com/404.php?taal=<?php echo(substr($lang, 0, 2))?>" name="inline_frame" id="inline_frame"
width="100%" height="100%" frameborder="0" marginwidth="0" scrolling="no" allowtransparency="true" >
Thanks in advance
Last edited by coderunner; 12-01-2013 at 08:26 PM.
If you don't need to support older versions of Internet Explorer (IE<9), then I'd suggest using CSS and set the background color of the document being loaded into the <iframe> to 'transparent'.
I'm surprised that the capitalization of the attribute name 'allowTransparency' makes a difference, but my brief research into 'allowtransparency' indicates that support is not uniform across all browsers. It started out as a proprietary attribute for Internet Explorer, and others started to support it later. It's obviously non-standard and relatively obscure, so you can't count on it going forward anyway.
A 100% x 100% <iframe> looks like a bit of a hack as well. What are you actually trying to do here?
Thanks for your reply.
It doesn't have anything to do with showing contents or not in the iframe, that's okay but in IE 10 it gives me a 404 error page (page not found)with the first code and with FF - Chrome - Opera - Safari it directs to the right page.
OK, you didn't explain what the problem was in your first message. The easiest way to find the problem is to load the page into both Internet Explorer and one of the other browsers and use "View Source" to look at the HTML code being seen by those browsers so you can check for a syntax error that one browser tolerates but the other can't handle. Running the page through an HTML validator would also be a good idea.
Okay rtrethewey I will follow your advice and try that out and I hope I can find the reason why.
Thanks for your help!
The error was in my php code. I fixed it and now it's one code that works in all the browsers.
Thank you for your time
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)