PDA

View Full Version : need help getting search to work



957
29 Sep 2010, 04:41 AM
Any help will be very much appreciated. I want this to act as an address bar.

html

<form name="searchformHTTP">
<input style="position:fixed;top:0;left:49.15%;width:10%;" type="text" name="searchterms"/>
<input class="buttonsearch" style="position:fixed;top:0;left:59.6%;" type="button" name="SearchSubmit" value="!" onsubmit="HTTP()"/>
<select name="HTTPops" style="position:fixed;top:0;left:61.7%;width:6%;">
<option value=".com">.com</option>
</select>
</form>

(external) javascript


function HTTP()
{
var sfHTTP=document.searchformHTTP;
var op=sfHTTP.HTTPops.options[sfHTTP.HTTPops.selectedIndex].value;
location.href = "http://"+sf.searchterms.value+"op";
return false;
}