467,211 Members | 1,210 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,211 developers. It's quick & easy.

asp with radio buttons on forms

Hello all...

I have a page that will be performing a search. The search consists of 3
radio button options. The first 2 will search the entire web through google
and the site as indexed by google. The 3rd option I want to search the site
using MS-Index Server. I can get them to run individually but I'm not sure
how to set the parameters and test for the 3rd radio button (index server)
selected on the page.

I thought that, for example, my Searchinc.asp could have an
If...then...else:

<form action="../gw/incl.idq" method="GET">
<td valign="bottom" align="right" width="100%">
<input type="HIDDEN" name="CiScope" value="/geo_portal/gw">
<input type="HIDDEN" name="CiMaxRecordsPerPage" value="10">
<input type="HIDDEN" name="TemplateName" value="incl">
<input type="HIDDEN" name="CiSort" value="rank[d]">
<input type="HIDDEN" name="HTMLQueryForm" value="../gw/incl.asp">
</td>
<td width="1">
</form>
<%else%>
<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com/custom"
target="google_window">
<%end if%>
<table width="770" height="32" border="0" align="center" cellpadding="0"
cellspacing="0" bgcolor="#FFFFFF">
<tr class="geoTopLinks"><td width="99" height="32" align="left"
valign="top" nowrap="nowrap">
<a href="http://www.google.com/">
<img SRC="http://www.google.com/logos/Logo_25wht.gif" alt="Google"
height="32" border="0"></img></a>
</td>
<td nowrap>
<input type="hidden" name="domains" value="www.site.com"></input>
<input type="text" name="q" size="15" maxlength="255" value=""></input>
<input type="submit" name="sa" value="Search">
</input> </td>
<td width="342" height="32" nowrap><font size="-1" color="#000000">
<input type="radio" name="sitesearch" value="">
<span class="Verd10pt">Web
<input type="radio" name="sitesearch" value="sitename">
GeoPlace
<input type="radio" name="sitesearch" value="geoworld" checked>
GeoWorld
</span></font><br>
<input type="hidden" name="client" value="pub">
</input>
<input type="hidden" name="forid" value="1">
</input>
<input type="hidden" name="channel" value="a number">
</input>
<input type="hidden" name="ie" value="ISO-8859-1">
</input>
<input type="hidden" name="oe" value="ISO-8859-1">
</input>
<input type="hidden" name="safe" value="active">
</input>
<input type="hidden" name="cof" value="big number">
</input>
<input type="hidden" name="hl" value="en">
</input>
</td>
<td width="133" nowrap>

The google part works just fine, I can't seem to get the index server piece
to work....

Can anyone give me any suggestions?

Thanks in advance...
Brian
Jul 19 '05 #1
  • viewed: 5326
Share:
1 Reply
Forget about what happens based on the radio button selection and just get a
handle on the radio buttons first with a form like this:

test.asp:

<form method="GET" action="test.asp">
<input type="radio" name="sitesearch" value="PutValueHere">Web
<input type="radio" name="sitesearch" value="sitename">GeoPlace
<input type="radio" name="sitesearch" value="geoworld" checked>
</form>

<%

Select Case Request.Querystring("sitesearch")
Case "PutValueHere"
Response.Write "You selected the ""Web"" radio button."
''code here
Case "sitename"
Response.Write "You selected the ""sitename"" radio button."
''code here
Case "geoworld"
Response.Write "You selected the ""geoworld"" radio button."
''code here
End Select
%>
Ray at home

"Brian" <bw*****@aip.com> wrote in message
news:e9**************@TK2MSFTNGP11.phx.gbl...
Hello all...

I have a page that will be performing a search. The search consists of 3
radio button options. The first 2 will search the entire web through google and the site as indexed by google. The 3rd option I want to search the site using MS-Index Server. I can get them to run individually but I'm not sure how to set the parameters and test for the 3rd radio button (index server)
selected on the page.

I thought that, for example, my Searchinc.asp could have an
If...then...else:

<form action="../gw/incl.idq" method="GET">
<td valign="bottom" align="right" width="100%">
<input type="HIDDEN" name="CiScope" value="/geo_portal/gw">
<input type="HIDDEN" name="CiMaxRecordsPerPage" value="10">
<input type="HIDDEN" name="TemplateName" value="incl">
<input type="HIDDEN" name="CiSort" value="rank[d]">
<input type="HIDDEN" name="HTMLQueryForm" value="../gw/incl.asp">
</td>
<td width="1">
</form>
<%else%>
<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com/custom"
target="google_window">
<%end if%>
<table width="770" height="32" border="0" align="center" cellpadding="0"
cellspacing="0" bgcolor="#FFFFFF">
<tr class="geoTopLinks"><td width="99" height="32" align="left"
valign="top" nowrap="nowrap">
<a href="http://www.google.com/">
<img SRC="http://www.google.com/logos/Logo_25wht.gif" alt="Google"
height="32" border="0"></img></a>
</td>
<td nowrap>
<input type="hidden" name="domains" value="www.site.com"></input>
<input type="text" name="q" size="15" maxlength="255" value=""></input>
<input type="submit" name="sa" value="Search">
</input> </td>
<td width="342" height="32" nowrap><font size="-1" color="#000000">
<input type="radio" name="sitesearch" value="">
<span class="Verd10pt">Web
<input type="radio" name="sitesearch" value="sitename">
GeoPlace
<input type="radio" name="sitesearch" value="geoworld" checked>
GeoWorld
</span></font><br>
<input type="hidden" name="client" value="pub">
</input>
<input type="hidden" name="forid" value="1">
</input>
<input type="hidden" name="channel" value="a number">
</input>
<input type="hidden" name="ie" value="ISO-8859-1">
</input>
<input type="hidden" name="oe" value="ISO-8859-1">
</input>
<input type="hidden" name="safe" value="active">
</input>
<input type="hidden" name="cof" value="big number">
</input>
<input type="hidden" name="hl" value="en">
</input>
</td>
<td width="133" nowrap>

The google part works just fine, I can't seem to get the index server piece to work....

Can anyone give me any suggestions?

Thanks in advance...
Brian

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Digital Puer | last post: by
3 posts views Thread by teddysnips@hotmail.com | last post: by
10 posts views Thread by =?Utf-8?B?UGFycm90?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.