Passing Parameters - struggling with frontpage (Full Version)

All Forums >> [Web Development] >> ASP, PHP, and Database



Message


LowSociety -> Passing Parameters - struggling with frontpage (3/30/2009 15:49:45)

Hi,
Please excuse me for asking what may be a dumb question, but I'm fairly new to working with ASP, particularly in FrontPage.

I have an intranet site that uses FrontPage 2003 to connect to an Access 2003 database and displays a list of choices for the visitor to select from one of the tables.

When a user clicks on an option, it takes them to a second page and users a parameter to filter the results based on their selection from the previous page. So far so good, however...

On the second page, I want the user to select from another list of choices (e.g. a dependant drop-down field) that will allow them to further filter their selection and display the results at the bottom of the page. When it filters on the second page, it 'forgets' the parameter passed from the first page.

How do I get the second page to remember the parameter that was passed, so the visitor can make further selections on page 2, based upon the original selection in page 1.

Hope this makes sense! Thanks for any help or suggestions provided.




BeTheBall -> RE: Passing Parameters - struggling with frontpage (3/30/2009 15:55:36)

Welcome!

Use request.querystring to get the passed parameter. For example, on page 2 you should be able to insert something like this to see the passed parameter:

<%
Response.write(request.querystring("NameOfParameter")
%>




LowSociety -> RE: Passing Parameters - struggling with frontpage (3/30/2009 16:33:40)

Hi,
Thanks for the welcome and the quick reply.

I am able to use the code you suggested to see the parameter passed to the second page, but when I try and pass the parameter either to another page with a second additional parameter, or to refresh the second page with both parameters, the first parameter gets lost.

Sorry if I'm not explaining myself very clearly.

On the first page, I may select option 1, 2 or 3. If I select Option 2...
On the second page I can see Option 2 as the passed parameter. But If I select another option a,b, or c - If I choose option c...
On the third page (or second page if I try and pass the parameters back to the same page), it either forgets both parameters, or at best, it only passes option c and forgets Option 2 (the first parameter).

Thanks,
Gary




TexasWebDevelopers -> RE: Passing Parameters - struggling with frontpage (3/30/2009 16:51:57)

This is an example of how to pass variables from page to page using a multi-part form and ASP.

We will "build-a-doll" by choosing Hair, Eye and Dress colors. We are going to pass the form variables from page to page and make sure they (1) are unable to be edited in subsequent pages and (2) place them in the next page's form field. On the last page we will write them out to the page and submit them to a database. You will then have an opportunity to edit the data in the database.

http://www.texaswebdevelopers.com/examples/passingvariables/index.asp




LowSociety -> RE: Passing Parameters - struggling with frontpage (3/30/2009 20:48:54)

Thank you very much.

That appears to be exactly the kind of thing that I'm trying to achieve. I'll have a look at the code and give it a try.

Your help is really appreciated - thanks again.

Gary




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625