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!

I'm in desperate need for help with these code...... 1

Status
Not open for further replies.

EdRev

Programmer
Aug 29, 2000
510
US
I have this two pages:

on my region.asp:
<html>
......
<form name=&quot;regform&quot; action=region_action.asp method=post>
<table BORDER=&quot;0&quot; WIDTH=&quot;486&quot; background=&quot;greenps.gif&quot;>
<TR><td><input type=&quot;radio&quot; name=region onclick=&quot;location.href='region_action.asp?region=2500'>
SouthWest</td>
<td><input type=&quot;radio&quot; name=region onclick=&quot;location.href='region_action.asp?region=2501'&quot;>
New England</td>
<td><input type=&quot;radio&quot; name=region onclick=&quot;location.href='region_action.asp?region=2502'&quot;>
Mid-Atlantic</font></td></TR>

and on the region_action.asp:
<%@ language=....%>
region_no = Request.Form(&quot;region&quot;)

Set hertzDB = Server.CreateObject(&quot;ADODB.Connection&quot;)
caseDB.Open dbCase

strtext = &quot;select * from area_name where area_no = '&quot; & region_no & &quot; ' &quot;
set regionset=caseDB.Execute(strtext)
if staffset.Eof then
%>
<b>No listing available for this region</b>
<%
else
staffset.movefirst

The code on the region_action.asp &quot;region_no = Request.Form(&quot;region&quot;)&quot; don't seem to work. I know my sql works because when I hard-code a value to it, the table gets displayed.

I'm laboring on this for a few days now, I might have missed something, any help will be gratly appreciated.
 
Edrev,

Try using this instead. You don't have to reference the ASP page on every click.

Fengshui1998


<table BORDER=&quot;0&quot; WIDTH=&quot;486&quot; background=&quot;greenps.gif&quot;>
<TR><td><input type=&quot;radio&quot; name=region value=&quot;2500&quot;>
SouthWest</td>
<td><input type=&quot;radio&quot; name=region value=&quot;2501&quot;>
New England</td>
<td><input type=&quot;radio&quot; name=region value=&quot;2502&quot;>
Mid-Atlantic</font></td></TR>

 
thanks fengshui1998,

It didn't work, when I click any of the button nothing happened.

I'll appreciate any more help or suggestions.
 
Is this literally the way you have this entered?

&quot;region_no = Request.Form(&quot;region&quot;)&quot;

presuming you still have the changes already recommended, just for grins try the line just as:

region_no = request(&quot;region&quot;)

also...you need to have quotes around

name = &quot;region&quot;

if you just straight copied FengShui's response, that may be all that is wrong...we can hope it's that simple!

hth
mark
:)

 
thanks hithere,

no, the quotes around &quot;region_no=request.form(&quot;region&quot;)&quot; is just to emphasize that this line didn't work. the request.form(&quot;region&quot;) is not being assigned to the region_no, that's why the sql doesn't return any records.
 
try this
on
region_no=request.querystring(&quot;region&quot;)

the problem is u supply the region value in the query string and u asking the value for the radio button. u didnt set the value of the radio buttons.

try the querystring concept
i tried this and i got the answer in the anothe page

i hope this will solve ur problem

with regards
raghu

 
webspy,

thanks a million!!!!!!
if you only knew how long i've labored for this.


 
edrev,

Since I removed the &quot;onclick&quot; for each radio button in my suggestion, you will need to add a new button to have the form submit. Something like this will submit values to region_action.asp.

<input type=&quot;submit&quot; name=&quot;Action&quot; value=&quot;Do it&quot;>

fengshui1998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top