transparent iframes using php
Posted: Thu Jun 23, 2005 9:53 am
hey..first off i know absolutely nothing about PHP...
I was trying to validate my site, and someone said that the way i was doing my iframes wasn't "valid." (I'm trying to fix probs with mozilla/ie compatibility and such)
So they instructed me to do them like this:
This works ok in mozilla, but not in IE. Also if you view the source code in mozilla somehow an extra ">" is added so the code appears like this:
(Note the extra ">" added after "name="iframe")
When I look at the source code in IE it appears the way I put it in...but doesnt work.
I'm wondering if my ignorance to PHP is causing a problem here or if theres an easy fix..or if i should remove the PHP alltogether.
The people who were helping me at another forum seemed to though the problem was with the extra "<" but no one knew how to fix it.
I hope i followed the "code posting rules" here, lol..i tried.
Thanks for your help very much
Elysia
I was trying to validate my site, and someone said that the way i was doing my iframes wasn't "valid." (I'm trying to fix probs with mozilla/ie compatibility and such)
So they instructed me to do them like this:
Code: Select all
<iframe src="http://www.irishelysia.net/greymatter/index.html" frameborder="0" height="345" width="460" name="frame" <?php if (ereg('MSIE', $_SERVER['HTTP_USER_AGENT'])) { echo 'allowtransparency="true"'; } ?>>
</iframe>Code: Select all
<iframe src="http://www.irishelysia.net/greymatter/index.html" frameborder="0" height="345" width="460" name="frame"><?php if (ereg('MSIE', $_SERVER['HTTP_USER_AGENT'])) { echo 'allowtransparency="true"'; } ?>>
</iframe>When I look at the source code in IE it appears the way I put it in...but doesnt work.
I'm wondering if my ignorance to PHP is causing a problem here or if theres an easy fix..or if i should remove the PHP alltogether.
The people who were helping me at another forum seemed to though the problem was with the extra "<" but no one knew how to fix it.
I hope i followed the "code posting rules" here, lol..i tried.
Thanks for your help very much
Elysia