master/detail page problem

R

Raphael Gluck

Hi Everyone

I am having some problems with a master detail page i have set up to
catalogue brochures from my site.
On my master page www.tripakltd.com/brochures.asp users are invited to
select from a list of brochure categories, then once they press the submit
button they will be taken to a different page www.tripakltd.com/library.asp
The problem i am having, is that when I tell the detail page about the
variable from the master page as a % as opposed to a hard number, i.e 1 or 2
I get an error, Therfore for the purpose of displaying the page i have put
in a hard number (rsLibrary__icategoryid = "1" as opposed to ="%") but of
course this only returns to me brochures that belong to categoryID.
How do i fix this problem? all my other master/detail pages seem, to work,
save this one.

To simplify the problem i have created two pages with just the code ( i.e no
graphics, or templates etc..) that carry the same technology, and have
included the relevant source code on the same page, with a .txt extension
www.tripakltd.com/brochures1.asp and www.tripakltd.com/brochures1.txt
www.tripakltd.com/library1.asp and www.tripakltd.com/library1.txt

Can anyone help me sort out this problem?

I would greatly appreciate it,

Thanks so much

Raphael
 
S

Stuart Palmer

If I get you right I htink the problem is that your select box does not have
a name......set the select as CategoryID and then the value should get
posted to the library.asp page.

Thats if I understand the question right.

Stu
 
R

Ray at

Hi,

I think the problem is that you're trying to pull in the product ID from the
querystring collection, but the form you're using is POSTing the data. So,
use Request.Form instead of Request.Querystring.

Ray at work
 
R

Raphael Gluck

Thanks for those ideas
I thought they looked just right to sort it, but when i tried, it still
didnt work.
Do you have any other ideas?

Thanks so much


Raphael
 
R

Raphael Gluck

Hi Ray
I tried chaging it to Request.Form but still it only works with the "1" and
not with the "%"

Do you have any other idea what the cause may be?

Thanks very much

Raphael
 
R

Ray at

The name of your select box is "select" not "categoryID."

You need to learn how to debug things. (I don't mean that the way it
sounds.) If you try to go right from point A to point Z and you don't get
there, you have to look at B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q,
R, S, T, U, V, W, X, and Y.


So, you have a form with a select box. The first thing you'd want to do to
debug this is to verify that the value from the select is being passed.
Here's what you'd do in library1.txt.


<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/Tripak.asp" -->
<%
Dim rsLibrary__icategoryid
rsLibrary__icategoryid = "%"
If (Request.Form("CategoryID") <> "") Then
rsLibrary__icategoryid = Request.Form("CategoryID")
End If

RESPONSE.WRITE RSLIBRARY_ICATEGORYID
RESPONSE.END

What's that tell you?

It'll tell you that rsLibrary__icategoryID is always %.
Then you wonder why that is. And you look at that code and you realize that
it must be because the If line is never true.
Then you wonder why that is. And you realize that is must mean that
Request.Form("CategoryID") is never <> "".
Then you wonder why that is. And you look at the form and realize that you
didn't name your select "CategoryID."

Or, you do something like
<%
For each x in Request.form
Response.write x & " = " & request.form(x) & "<br>"
Next
RESPONSE.END
%>

And you see all the form values. And then you notice that there is no
request.form("CategoryID"), at which time you realize that you named the
select wrong.

Ray at work
 
R

Raphael Gluck

Hi Ray,

Thanks i just changed the Select box, and called it CustomerID and now it
works,

But you are right to admonish me. I must learn!
This was done with a WSYWYG editor (dreamweaver MX) and i really must chuck
it .
I have done in principal. I am not using it to go further. I am now catching
up by going backwards and learning the basics, so as to move forwards.

Thanks very much

Raphael
 
S

Stuart Palmer

Hi Raphael,
The solution I suggested was the solution you finally said fixed it.....what
did you try that didn't work based on my suggestion? Interesting for me as
if I am not explaining ideas right then it's pointless me suggesting stuff.
:eek:)

Stu
 
A

Adrienne

Hi Ray,

Thanks i just changed the Select box, and called it CustomerID and now
it works,

But you are right to admonish me. I must learn!
This was done with a WSYWYG editor (dreamweaver MX) and i really must
chuck it .
I have done in principal. I am not using it to go further. I am now
catching up by going backwards and learning the basics, so as to move
forwards.

Thanks very much

Raphael

May I suggest http://www.chami.com/html-kit . Free, syntax highlighting,
save your snippets, save your templates, plugins, HTML-Tidy plugin, other
plugins.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top