Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 searching web and snitz from same input box
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

e3stone
Average Member

USA
885 Posts

Posted - 20 April 2001 :  22:13:29  Show Profile  Send e3stone an AOL message
On the top of my front forum page I have two search boxes. The one that searches the link manager mod and one from lycos which searches the web. How would I be able to make one input box and have a drop-down list box giving the user the choice of searching the web or my link manager? My page is http://galileandesigns.com/forum/newdefault.asp and I want my search box to look like the one at the top of Cnet's page http://www.cnet.com Anyone know how to do this?

Thanks,
Eric

Marino
Starting Member

Canary Islands
42 Posts

Posted - 20 April 2001 :  23:46:20  Show Profile  Send Marino an ICQ Message
Code for the main search form


<form action="redirect_search.asp" method=get target="_blank">
<table border="0" cellpadding="0" cellspacing="0" bgcolor="black" align=center width="100%">
<tr>
<td align="middle" bgcolor="white">
<div align="center">
<input type="hidden" name="lpv" value="1">
<input type="hidden" name="loc" value="lycosinc">
<font size=-1><b>Search the web:</b></font>
<input type="text" name="query" size=30>
<input type="hidden" name="num" value="30">
<SELECT name="option">
<OPTION value="lycos">Lycos</option>
<OPTION value="insidewaco">InsideWaco</option>
</select>
<input type="submit" value="Go Get It" border=0>
</div>
</td>
</tr>
</table>
</form>


Now create file called redirect_search.asp. This file should have this


<%
if Request("option") = "lycos" then
Response.redirect "http://www.lycos.com/srch/?query=" & Server.HTMLEncode(Request("query")) & "&lpv=1&loc=lycosinc"
else
Response.redirect "http://galileandesigns.com/forum/links_search.asp?search=" & Server.HTMLEncode(Request("query")) & "&num=" & Request("num")
end if
%>


This do the trick. I removed the option to specify the number of results as it is useless for lycos. If you want it back, just change the hidden num for a radio.


Marino
Go to Top of Page

e3stone
Average Member

USA
885 Posts

Posted - 21 April 2001 :  03:44:23  Show Profile  Send e3stone an AOL message
yes. Thanks Marino. That code works perfectly.

Go to Top of Page

Marino
Starting Member

Canary Islands
42 Posts

Posted - 21 April 2001 :  09:58:57  Show Profile  Send Marino an ICQ Message
Glad to be useful

Marino
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07