How passing variable to frameset for muli search
I'm looking solution to make my searches as Google+Bing+Yahoo+ASk i want using frameset to send query when send query show link as other search engine in top frame named header
i tried to send query and see result in header.php
Resources is there: index.html
<pre>
<frameset>
rows="30,*" frameborder="0">
<frame name="main" src="search-engine.php" />
<frame name="header" nore开发者_JAVA百科size="noresize" scrolling="no" src="header.php" />
<frameset>
search-engine.php
<form action="header.php" method="get">
<input type="text" name="keyword" autocomplete="off" />
<input type="submit" />
</form>
<?php
$keyword=$_GET["keyword"];
echo "<a href='http://www.bing.com/search?q=$keyword' title=''>bing</a>";
echo "<br>";
echo "<a href='http://www.google.com/search?q=$keyword' title=''>google</a>";
echo "<br>";
echo "<a href='http://search.yahoo.com/search?p=$keyword' title=''>Yahoo!</a>";
?>
header.php
header("Location: http://search.yahoo.com/search?p=$keyword");
Framesets are 1993. They are bad in usability, because -amongst other problems- they mess with your browser history. I believe they are not even supported in XHTML and HTML5. If you're developing something new here, don't start with frames.
These sites work with Ajax. It means they send a request to the server in the background, while the page is visible. The responsed is processed using Javascript and put inside an element on the page. That way, you can update parts of the page, while the page itself doesn't get refreshed.
Search for AJAX
, which should lead you to a great number of tutorials about this subject.
精彩评论