Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
7 - 0 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Search Block - Customized - need a litle help
by pete0 on 2003/10/29 11:52:45

I have made the following block that is a replacement for the site search block - but it has 2 radio buttons, 1. Google 2. XOOPS site - so you can search google or the site with the click of one radio button - BUT i need to know if it is possible to pass parrameters to the search.php? url - like you can with google etc to make it work, or maybe some one could give me some pointers with ym script?

If i check the xoop-search (gauntlet i named it here) then i return a blank page, google works fine.


So my question is if using http://www.thegauntlet.org/search.php

How do i pass the search query to the url? like you can do with google eg

http://www.google.com/search?hl=en&q=xoops

how would i achieve the same thing with XOOPS search? Or is there something i can add to my current form (below) to achieve this?


le="color: #000000"><?php <form method="get" name="SearchForm"onSubmit="return fetch()"> <div align="left"></div> <table border=0 cellpadding=0 cellspacing=0> <tr> <td colspan="2"><div align="left"><font face="Georgia, Times New Roman, Times, serif"><b></b></font></div></td> </tr> <tr> <td colspan="2"><div align="left"><font size=2 face=Arial><strong> </strong></font></div> <div align="left"><font size=2 face=Arial><strong><font color="#004040" size="2" face="Arial"> <input type="text" size=20 maxlength=200 name="query"> </font> </strong></font></div></td> </tr> <tr> <td><font size=2 face=Arial><strong> <input type="radio" checked name="SITE" value="Google" onClick="setsite('Google')"> Google</strong></font></td> <td><font size=2 face=Arial><strong> <input type="radio" name="SITE" value="Gauntlet" onClick="setsite('Gauntlet')"> Gauntlet</strong></font></td> </tr> <tr> <td colspan="2"><div align="left"><strong><font size=2 face=Arial><strong><font color="#004040" size="2" face="Arial"> <input type="submit" name="BtnSearch" value="Search"> </font><font size=2 face=Arial><strong><font size=2 face=Arial><strong><font color="#004040" size="2" face="Arial"> <input type="hidden" name="hl" value="en"> <input type="hidden" name="action" value="results"> </font></strong></font></strong></font><font color="#004040" size="2" face="Arial"> </font></strong></font><font color="#004040" size="2" face="Arial"> </font></strong></div></td> </tr> <tr> <td><div align="left"><strong><font size=2 face=Arial><strong><font color="#004040" size="2" face="Arial"> </font><font size=2 face=Arial><strong><font color="#004040" size="2" face="Arial"> </font></strong></font><font color="#004040" size="2" face="Arial"> </font></strong></font><font color="#004040" size="2" face="Arial"> </font></strong></div></td> <td>&nbsp;</td> </tr> <tr> <td width=93><div align="left"><font size=2 face=Arial><strong><font color="#004040" size="2" face="Arial"> </font> </strong></font></div></td> <td width=87><div align="left"><font size=2 face=Arial><strong><font color="#004040" size="2" face="Arial"> </font> </strong></font></div></td> </tr> </table> <blockquote> <div align="left"><strong><font color="#004040" size="2" face="Arial"> <br> </font></strong></div> </blockquote> </form><script language="JavaScript"><!-- current_site="Google" function fetch(){tmp=document.SearchForm.query.value;stmp="";for(i=0;i<=tmp.length;i++) {if(tmp.charAt(i)==" ") {stmp=stmp+"+";}else {stmp=stmp+tmp.charAt(i);}}SendSearch() return false;}function SendSearch() {if(current_site=="Google") {top.location.href="http://www.google.com/search?hl=en&q="+stmp;}else if(current_site=="Gauntlet") {top.location.href="http://www.thegauntlet.org/search.php?query="+stmp;}else {top.location.href="http://home.microsoft.com/access/allsearch.asp?SITE="+current_site+"&Search="+stmp;}return false;}function setsite(sitenow){current_site=sitenow;}//--></script> </body>

Who's Online

224 user(s) are online (190 user(s) are browsing Support Forums)


Members: 0


Guests: 224


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits