Mustang Evolution Forum banner
1 - 3 of 3 Posts

·
Registered
Joined
·
44 Posts
Discussion Starter · #1 ·
Hey guys, What im trying to do is a make a HTML code with a custom search box.

And what I want to do is search ebays completed listings for cars, so I can get an idea on how much they are going for. (Im in the car buisness)

So If I put in this link: http://motors.completed.shop.ebay.com/items/?_nkw=1965%20mustang&_sacat=6001&_trksid=p4506.m270.l1313&_dmpt=US_Cars_Trucks&LH_Complete=1&_odkw=car&_osacat=6001

It will show me all the completed & sold listings for 1965 mustang.
I want a search box where I can put in anything and it will search it all I need to change is this field where the "****************" is and any car would go in there.

http://motors.completed.shop.ebay.com/items/?_nkw=****************&_sacat=6001&_trksid=p4506.m270.l1313&_dmpt=US_Cars_Trucks&LH_Complete=1&_odkw=car&_osacat=6001


So all I want to do is type in a car name and click Go and I got that page.. PLEASE HELP HTML WIZARDS!! THANK YOU!!
 

·
Registered
Joined
·
40 Posts
You'll need Javascript for that - you can't do it in HTML. HTML is just what you typed into the HTML file - if you want that link to change based on what the user types into a text box, you'll need programming to change the link on the fly. That means first learning computer programming, then learning Javascript. Start with http://www-old.oberon.ethz.ch/WirthPubl/AD.pdf to learn programming.
 

·
Registered
Joined
·
39 Posts
Here is a quick script I just wrote up for you. It uses HTML and JavaScript, just save it as anything.html (the ".html" at the end is required for it to work.) Then you can open it with any web browser and just type in what you want and hit search.

<html>
<head>
<title>Ebay Search</title>
<script language="JavaScript">
function Search() {
if (document.dsearch.searchbox.value!="") {
var loc = "http://motors.shop.ebay.com/items/?_nkw…
window.open(loc + document.dsearch.searchbox.value) ;
}
else {
alert("Please enter something to search.")
document.doingasearch.searchbox.focus();
}
}
</script>
</head>
<body>
<form name="doingasearch" id="dsearch">
<input name=searchbox type=text>

<input type="button" value="Search" onclick="return Search();">
</form>
 
1 - 3 of 3 Posts
Top