Forum Moderators: coopster
MY PROBLEM: I output from a form to a page that displays an i-frame at the top and and an i-frame for the bottom page. The bottom page is not allowed to scroll and I need the whole page to show.. The reason I cannot set the length exactly is because it is a search engine and it varies depending on the search (we all know this). Ive tried to use an include like this:
<?php include ("$strengine$keyterm");?>
But this doesnt work.. the search engines kill any spaces in my keywords and the page just looks funky like the stylesheet was left out along with some images. I have an example url below to see how the i-frame version works.
(the iframe in the top is fine. I just need the bottom to fully display)
I have a form on an html page that sends variables to a php page. The variables are: $url,$keyterm and $searchengine
From these variables I create a page that is in so many words split into two pages "visually". the $url variable assists in displaying the top portion of the page and the $keyterm and $searchengine variables assist in the bottom portion.
ex: http://www.example.com/godot/demo_test.htm
Here is my current page:(if you scroll to the bottom of the script thats where my bottom i-frame is that is making this rough. I need to replace this i-frame with something that will fully load the page into the current document.)
<body bgcolor="#F7F7F9" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<?php
if ($searchengine == 'google')
{
$strengine = "http://www.google.com/search?hl=en&q=";
}
elseif ($searchengine == 'yahoo')
{
$strengine = "http://search.yahoo.com/search?ei=UTF-8&fr=sfp&p=";
}
elseif ($searchengine == 'msn')
{
$strengine = "http://search.msn.com/results.aspx?q=";
}
?>
<table width="97%" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="82%"><a href="#"><img src="http://www.example.com/godot/exdemo.jpg" width="70" height="20" border="0"></a></td>
<td width="17%" class="GreyBodyText"><div align="right"><a href="<? echo $url;?>" target="_blank" class="GreyBodyText">Click
to view featured site</a></div></td>
</tr>
</table>
<table width="97%" height="235" border="0" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#CCCCCC">
<td height="5" colspan="3"><img src="spcr.gif" width="1" height="5"></td>
</tr>
<tr>
<td width="5" bgcolor="#CCCCCC"><img src="spcr.gif" width="5" height="5"></td>
<td><iframe name=topwindow src="<? echo $url;?>?input=<? echo $input;?>" frameBorder=0 scrolling="yes" width=100% height="100%"></iframe></td>
<td width="5" bgcolor="#CCCCCC"><img src="spcr.gif" width="5" height="5"></td>
</tr>
<tr bgcolor="#CCCCCC">
<td height="5" colspan="3"><img src="spcr.gif" width="5" height="5"></td>
</tr>
</table>
<br>
<iframe name=topwindow src="<? echo $strengine?><? echo $keyterm;?>" frameBorder=0 scrolling="no" width=100% height="100%"></iframe>
</body>
.................................................
I hope this is clear enough.. Im new at this.
Thanks in advance,
Rusty
[edited by: jatar_k at 9:15 pm (utc) on Oct. 4, 2005]
[edit reason] generalized url [/edit]