Background Colour In Iframe

admin

Administrator
Staff member
Hi, I have a page with the following content called index.php:<br />
<br />
<iframe align="top" width="200" height="40" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src=http://www.htmlforums.com/archive/index.php/"http://www.provance.net/view.php?uid=1&display=banner"></iframe><br />
<br />
What I need todo is set the background of the page in the iframe to the background of the index.php page. The problem I'm having is that the view.php file can be modified but the code above is repeated on several sites with different background codes and I don't want the code tobe different for each site. I'd be greatful if you could help.<br />
<br />
Thanx<!--content-->is the background for that PHP page set dynamically or something? if so, just put the variable in the URL and set it that way.<!--content-->Nope, I can not control the content of the index.php page, only the code for the iframe and the code for the view.php file.<br />
<br />
The reason it's for a script I'm making sorta like a stats thing where multiple users place the code on their site and it loads a little script inside the iframe from the main site.<!--content-->i don't understand.<br />
<br />
1) what kind of variations on that view.php page will there be?<br />
2) what exactly is the code for view.php?<br />
3) how is view.php being called on the other sites, or wherever it's being called from?<!--content-->OK, users sign up and place the following on their site:<br />
<br />
<iframe align="top" width="200" height="40" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src=http://www.htmlforums.com/archive/index.php/"http://www.provance.net/view.php?uid=1"></iframe><br />
<br />
The content of the view.php is:<br />
<br />
<?<br />
<br />
require "./header.php";<br />
<br />
$query = $db->query("SELECT * FROM $table_members WHERE status!='Suspended' && status!='Approve' && vacation='no' ORDER BY RAND() LIMIT 0, 1");<br />
$member = $db->fetch_array($query);<br />
<br />
echo '<a href=http://www.htmlforums.com/archive/index.php/"click.php?uid='.$uid.'&tid='.$member[uid].'" target="_blank">'.$member[sitename].'</a>';<br />
<br />
?><br />
<br />
As you can see the only content generated on this page is just the content from the echo statement. Therefore a background is not set. If a user has a red background then then the background for the above bit is white and it doesn't look right. One way I could do it is to pass a variable via the iframe src saying the background colour but that would require the user modifying the code (unless it can be done via javascript).<br />
<br />
Hope that helps. Thanx<!--content-->
 
Back
Top