Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Page with Form and ASP

Reply
Thread Tools

Page with Form and ASP

 
 
Richard Speiss
Guest
Posts: n/a
 
      09-28-2004
I'm not sure if this is a server side or client side issue.

I have a straightforward ASP page that queries a database and displays a
list of restaurants. This works fine.

I wanted to add the ability for the user to filter the list by specifying a
city and quadrant of the city (NW, NE, SW, SE) in two separate list boxes.

Using the FORM command I was able to create the list boxes and populate them
when my page loads. Again this is working fine.

Now the user can click on these boxes and make a selection. What I can't
figure out is how to get the data from those list boxes and change my SQL
query. I did some searching and most sites say that you need a submit
button which will send the variables to another page. I tried creating a
submit button and sending it back to my original page but this didn't work.

1. I don't want to start up another page. I just want to redisplay the
current page using the new parameters (and preferrably have the list box
display the new selection too)

2. Preferrably I would not even have to press the Submit button. I would
prefer that as soon as a person makes a choice that the I would be able to
redisplay my current page using that selection.

I'm pretty new to all of this and learning it as I go. Am I asking for the
impossible or is there some way to do this?

Thanks

Richard


 
Reply With Quote
 
 
 
 
Dan Abrey
Guest
Posts: n/a
 
      09-28-2004

"Richard Speiss" <(E-Mail Removed)> wrote in message
news:U956d.127808$%S.70632@pd7tw2no...
> I'm not sure if this is a server side or client side issue.
>
> I have a straightforward ASP page that queries a database and displays a
> list of restaurants. This works fine.
>
> I wanted to add the ability for the user to filter the list by specifying

a
> city and quadrant of the city (NW, NE, SW, SE) in two separate list boxes.
>
> Using the FORM command I was able to create the list boxes and populate

them
> when my page loads. Again this is working fine.
>
> Now the user can click on these boxes and make a selection. What I can't
> figure out is how to get the data from those list boxes and change my SQL
> query. I did some searching and most sites say that you need a submit
> button which will send the variables to another page. I tried creating a
> submit button and sending it back to my original page but this didn't

work.
>
> 1. I don't want to start up another page. I just want to redisplay the
> current page using the new parameters (and preferrably have the list box
> display the new selection too)
>
> 2. Preferrably I would not even have to press the Submit button. I would
> prefer that as soon as a person makes a choice that the I would be able to
> redisplay my current page using that selection.
>
> I'm pretty new to all of this and learning it as I go. Am I asking for

the
> impossible or is there some way to do this?


The solution is to send the form variables to the current page, and use the
variables created in the SQL statement.


 
Reply With Quote
 
 
 
 
Richard Speiss
Guest
Posts: n/a
 
      09-29-2004
Thanks I got it going. The biggest problem was that I was trying to use GET
instead of POST. Once I started using POST things started to work for me.
From the docs I read it seemed like should be using GET but if it works, I'm
not going to argue

Richard

"Dan Abrey" <(E-Mail Removed)> wrote in message
news:cjbnlt$apv$(E-Mail Removed)...
>
> "Richard Speiss" <(E-Mail Removed)> wrote in message
> news:U956d.127808$%S.70632@pd7tw2no...
>> I'm not sure if this is a server side or client side issue.
>>
>> I have a straightforward ASP page that queries a database and displays a
>> list of restaurants. This works fine.
>>
>> I wanted to add the ability for the user to filter the list by specifying

> a
>> city and quadrant of the city (NW, NE, SW, SE) in two separate list
>> boxes.
>>
>> Using the FORM command I was able to create the list boxes and populate

> them
>> when my page loads. Again this is working fine.
>>
>> Now the user can click on these boxes and make a selection. What I can't
>> figure out is how to get the data from those list boxes and change my SQL
>> query. I did some searching and most sites say that you need a submit
>> button which will send the variables to another page. I tried creating a
>> submit button and sending it back to my original page but this didn't

> work.
>>
>> 1. I don't want to start up another page. I just want to redisplay the
>> current page using the new parameters (and preferrably have the list box
>> display the new selection too)
>>
>> 2. Preferrably I would not even have to press the Submit button. I would
>> prefer that as soon as a person makes a choice that the I would be able
>> to
>> redisplay my current page using that selection.
>>
>> I'm pretty new to all of this and learning it as I go. Am I asking for

> the
>> impossible or is there some way to do this?

>
> The solution is to send the form variables to the current page, and use
> the
> variables created in the SQL statement.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GrayHairDay: moving page controls to a form and then the form back to the page? matthias s ASP .Net Web Controls 0 09-20-2007 09:48 PM
how to submit form data from non asp.net page to asp.net page Dica ASP .Net 2 05-18-2006 06:02 PM
javascript form validation - form action to another asp page iam247@gmail.com ASP General 7 08-20-2005 10:06 PM
javascript form action = send form details to ASP page iam247@gmail.com Javascript 2 08-07-2005 08:16 AM
Sending information from an ASPX page to ASP page using form and post method Ricardo Magalhaes ASP .Net 0 06-03-2005 02:37 PM



Advertisments