Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

does anyone have any idea/method on how to get this script to work?

Status
Not open for further replies.

estesflyer

Programmer
Dec 19, 2000
284
US
does anyone have any idea/method on how to get this script to work?


<html>
<head>
<title>Estes_Flyer</title>
<script language=&quot;javascript&quot;>
<!--
function searchnet()
{

}
//-->
</script>
</head>
<body background=&quot;C:\My Documents\webpages\background.bmp&quot;>
<form method=&quot;post&quot; action=&quot;&quot; name=&quot;searchform&quot;>
<input value=&quot;search for what?&quot; type=&quot;textbox&quot; size=&quot;17&quot; name=&quot;searchquery&quot;>
<table border=&quot;0&quot; width=&quot;0&quot; height=&quot;8&quot;>
<tr><td></td></tr></table>
<select size=&quot;3&quot; name=&quot;searchlist&quot;>
<option value=&quot;searchURL&quot;>Altavista.com</option>
<option value=&quot;searchURL&quot;>Lycos.com</option>
<option value=&quot;searchURL&quot;>Hotbot.com</option>
<option value=&quot;searchURL&quot;>Google.com</option>
<option value=&quot;searchURL&quot;>NBCI.com</option>
<option value=&quot;searchURL&quot;>AllTheWeb.com</option>
<option value=&quot;searchURL&quot;>Go.com</option>
<option value=&quot;searchURL&quot;>GoTo.com</option>
<option value=&quot;searchURL&quot;>Cnet.com</option>
<option value=&quot;searchURL&quot;>Yahoo.com</option>
<option value=&quot;searchURL&quot;>DogPile.com</option>
<option value=&quot;searchURL&quot;>Excite.com</option>
<option value=&quot;searchURL&quot;>Cyber411.com</option>
<option value=&quot;searchURL&quot;>Galaxy.com</option>
<option value=&quot;searchURL&quot;>Express.com</option>
<option value=&quot;searchURL&quot;>InfoHighway.com</option>
<option value=&quot;searchURL&quot;>Infomine.com</option>
<option value=&quot;searchURL&quot;>Inference.com</option>
<option value=&quot;searchURL&quot;>InfoSeek.com</option>
<option value=&quot;searchURL&quot;>Linkmaster.com</option>
<option value=&quot;searchURL&quot;>InternetSleuth.com</option>
<option value=&quot;searchURL&quot;>Magellan.com</option>
<option value=&quot;searchURL&quot;>Matilda.com</option>
<option value=&quot;searchURL&quot;>Mamma.com</option>
<option value=&quot;searchURL&quot;>Metacrawler.com</option>
<option value=&quot;searchURL&quot;>Accufind.com</option>
<option value=&quot;searchURL&quot;>NorthernLight.com</option>
<option value=&quot;searchURL&quot;>Linkstar.com</option>
<option value=&quot;searchURL&quot;>JunkYard.com</option>
<option value=&quot;searchURL&quot;>Search.com</option>
<option value=&quot;searchURL&quot;>Reference.com</option>
<option value=&quot;searchURL&quot;>PlanetSearch.com</option>
<option value=&quot;searchURL&quot;>DirectHit.com</option>
<option value=&quot;searchURL&quot;>HotLava.com</option>
<option value=&quot;searchURL&quot;>FindIt.com</option>
<option value=&quot;searchURL&quot;>EasySearch.com</option>
<option value=&quot;searchURL&quot;>Thunderstone.com</option>
<option value=&quot;searchURL&quot;>Inktomi.com</option>
</select><table border=&quot;0&quot; width=&quot;0&quot; height=&quot;8&quot;>
<tr><td></td></tr></table>
<input type=&quot;button&quot; onClick=&quot;searchnet()&quot; value=&quot;Search&quot;>
</form>
</body></html>
 
First of all the values of your select options should be different. I would suggest

<OPTION VALUE=&quot;YAHOO.COM...&quot;>Yahoo

<!--
function searchnet(){
var srchURL=window.searchform.searchlist.value;
srchURL = &quot; + srchURL
window.searchform.action=srchURL
window.searchform.submit()

}
//-->

I think this is what you are trying to acheive.
 
ok, but why would you put window.searchform.submit(); ?

i only put the searchURL for the option values so it would help people better understand, i guess. :)
had to put something there while i still dont have the real URL's.
 
A submit button automatically submits a form but a standard button does not. If you don't submit the form nothing will happen.

Niv
 
lol, that is you haev for the button, onClick=&quot;searchnet()&quot; so the new window will come up, w/ all the crap, etc, etc, etc... anyway, thanks for tleling me that tho!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top