If the FORM submits to itself can't you just use 
NewLBValue = Request.Form("NameOfListbox") 

and in the listbox do <SELECT><OPTION VALUE="<%=NewLBValue%>"><%=NewLBValue%
></OPTION>


Quoting LeGrand Decius <[EMAIL PROTECTED]>:

> Below I have a sample page with a listbox that submits to itself.
> How can I set the default selected value based on the previous selection?
> =================================================
> <html>
> <head>
> <title>Test</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <SCRIPT language=JavaScript>
> function getSelectedIndices (){
> var comboValue
> var selIndex = document.form1.selReports.selectedIndex;
> document.form1.sindex.value = selIndex;
> }
> </SCRIPT>
> 
> </head>
> 
> <body bgcolor="#FFFFFF" text="#000000">
> <form name="form1" method="post" action="Default_listbox.htm">
>   <p><select name="selReports" onChange="getSelectedIndices()">
>     <option value="0">Available Reports</option>
>     <option value="1">My Reports</option>
>     <option value="2">All Reports</option>
>   </select>
> </p>
>   <p>
>     <input type="submit" name="Submit" value="Submit">
>     <input type="hidden" name="sindex">
>   </p>
> </form>
> </body>
> </html>
> 
> 
> 
> ---
> You are currently subscribed to activeserverpages as:
> [EMAIL PROTECTED]
> To unsubscribe send a blank email to
> %%email.unsub%%
> 





---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to