|
|
|
|
|
| | |
|
Active Server Pages help tutorial how to ASP Help ASP Tutorials ASP Programming ASP Code - ASP Free CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Session Woes-Expert Challenge |
From: |
Suzanne Corcorran |
Date: |
2/23/1999 5:14:42 PM |
IP: |
206.50.182.6 |
We have a frameset that contains two rows, one column. The top frame contains a form that used to input information with which to query the database. The bottom frame contains a "generic" page that provides different reports based on what variables are passed to it. The reason we are using <input type> instead of <a href> to pass information is that we are taking the information that was sent to the generic page from the top frame, adding a value to it from a radio button contained on the generic page, and we are trying to add another value based on which button (or <input type>) the user clicks on. This way the generic page produces a new report based on the new variables passed to it combined with the old variables from the first form that we are resending using the "hidden" attribute. We know we could use a list box to provide this value, but we want to use image buttons if possible. We are trying to set a session variable to one of three values based on the button/image the user clicks - but the result is that the last button with the onclick assigned as demonstrated below is the value that the action reacts to.
Code example follows:
<%If session("DrillDown") = "True" Then%>
<input type="image" SRC="images/btnQUAL.gif" border="0" align="top"
method="post" action="generic_report.asp" onclick=<%session("ReportType")="QTRSB"%> name="btnQUALTRANS" WIDTH="100" HEIGHT="21">
<input type="image" SRC="images/btnNONQUAL.gif" border="0" align="top"
method="Post" action="generic_report.asp" onclick=<%session("ReportType")="NQTRSB"%> name="btnNONQUALTRANS" WIDTH="100" HEIGHT="21">
<input type="image" SRC="images/btnALLTRANS.gif" border="0" align="top"
method="Post" action="generic_report.asp" onclick=<%session("ReportType")="ATRSB"%> name="btnALLTRANS" WIDTH="100" HEIGHT="21">
<%End If%>
Regardless of the button clicked (and in fact, even if no button is clicked), session("ReportType") has a value of "ATRSB". We are trying to avoid using a drop-down list and creating a "submit" button. We want three separate image buttons, each one sending a different variable. The button click is executed after the user has selected a radio button associated with a row of data on the form (the row the user wants to 'drill down' to - the HREF example does not allow me to pass this additonal data back to the form AND set the conditional session value (so that specific SQL can be executed). |
Follow Up - Re: Session Woes-Expert Challenge - Pete 2/24/1999 4:45:22 AM
|
|

|
|
|
|
|
|
|
|
|
|