Click to See Complete Forum and Search --> : Passing parameters from DRW to url using onchange


DScoffers
04-22-2008, 07:31 AM
Hi all,
I have some drop down lists generated by DRW.

I want to use the onchange function on the drop down to automatically open another page with the newly selected value as a parameter in the URL.
I've used the guide on frontpagehowto.com (http://www.frontpagehowto.com/howto/onchangedropdown.htm) to add the onchange action and it does open the page I've specified in Form properties.

However it doesn't allow me to add the parameter from the drop down to the url.
Fixtureprice2.asp?TicketCat=<%=FP_FieldURL(fp_rs,"TicketCat")%>

<%=FP_FieldURL(fp_rs,"TicketCat")%> should be the newly selected value.
If I put Fixtureprice2.asp?TicketCat=3
then it works, so the <%=FP_FieldURL(fp_rs,"TicketCat")%> muct be incorrectly stated.
All help appreciated.

yamaharuss
04-23-2008, 09:33 AM
What is the value of FP_FieldURL(fp_rs,"TicketCat")??

Are you sure you are getting the correct value??

always do

response.write(" the value is "&FP_FieldURL(fp_rs,"TicketCat"))

for error checking

DScoffers
04-23-2008, 10:05 AM
Hi yamaharuss,
The value of <%=FP_FieldURL(fp_rs,"TicketCat")%> is the value of the drop down list, which uses a DRW section to populate the drop down.

A little more explanation:

On one page I have a hyperlink which is generated in a DRW section, using parameters based on the row the hyperlink is in.

This opens another page (Fixtureprice2.asp) which shows a TotalPrice based on the parameters in the url.
e.g.
"Fixtureprice2.asp?HomeTeam=AC+Milan&Versus=Parma&Country=Italy&City=Milan&GameCat=A&HotelStandard=3&TicketCat=3&HotelNights=2"

e.g.
URL
"Fixtureprice2.asp?HomeTeam=AC+Milan&Versus=Parma&Country=Italy&City=Milan&GameCat=A&HotelStandard=3&TicketCat=3&HotelNights=2"

I then have a drop down for HotelNights which is populated by another DRW section, and when changed to 3 would submit the page with the new parameter and the other current parameters as well:

"Fixtureprice2.asp?HomeTeam=AC+Milan&Versus=Parma&Country=Italy&City=Milan&GameCat=A&HotelStandard=3&TicketCat=3&HotelNights=3"

At the moment I can get the page to submit with the new parameter of HotelNights=3,
"Fixtureprice2.asp?HotelNights=3"

but how do I pass over the other parameters which should remain the same?

Phew, does that make anymore sense?