Hi, Current situation: I have an unordered html list with list items calling an asp (with an url parameter), look at the code below Desired situation: I have an unordered html list with list items calling an asp (without url parameter, instead passing parameter in a different way, maybe via the session variable). Question: how to pass selected list item value/index to an asp (without url parameters)? Thanks <% LocalArray = Session("JaarArr") %> <ul class="secondair-menu" id="YearList"> <% For i = 0 to cInt(Session("Aantaljaar"))-1 %> <li><a href="cumulatief.asp?jaar=<%=localArray(i)%>"><script language=Javascript>formatjaar(<%=localArray(i)%>)</script></a></li> <% Next %> </ul> Code (markup):
The only way I know of passing values outside of a URL string in ASP is by posting the values to the destination page, like so: ### start page ### <% LocalArray = Session("JaarArr") %> <form id="formx" method="post" action="cumulatief.asp"> <select id="YearList"> <% For i = 0 to cInt(Session("Aantaljaar"))-1 %> <option value="<%=localArray(i)%>"><%=localArray(i)%>)</option> <% Next %> </select> <input type="submit" value="submit" /> </form> Code (markup): ### cumulatief.asp ### <% If Request.Form("YearList") <> "" Then 'whatever other processing you want to do here... Session("SelectedValue") = Request.Form("YearList") End If %> Code (markup): You could make it a bit smoother by using javascript to submit the form on the starting page (onchange="document.formx.submit();") not perfect but may be worth looking into as a workaround. Good luck with it!