View Full Version : Creating a searchable banner
tommy
10-11-2003, 06:04 PM
I am after a way of creating a banner with a search box inside it so that other sites can advertise my banner on their site and a user can search my database and retrieve the reults which are then dislayed on a seperate window.
Thanks in advance
Tom
P.S. Like the new site
Most of this question seems to be server side.
But for the html part, is it something like this that you want?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Get Info</title>
</head>
<body>
<!-- banner -->
<div id ="banner">
<style>
#banner{
width:100%;
height:50px;
background:yellow;
border:outset 2px;
}
</style>
<script>
var myWebSite="http://www.mySite/myPage.html"; // for instance a php page
function searchMyDatabase(){
window.open(myWebSite+"?"+info.value)
}
</script>
Search my database for info:
<input
name="info"
type="text"
value=""><input type="button"
onclick="searchMyDatabase()";
value="GO">
</div><!-- end banner -->
</body>
</html>
GDS
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.