March 25th, 2003, 12:03 PM
The target page has session variables that collects the form values.
And displays them as a drop-down list. Onchange of drop-down the form is submitted in the target page.
When I focus to the target window I can see the values listed in the drop-down, but onchange of the value, the form gets submitted, reloading the target page, with no values in the dropdown.
listarr= Split(Session("form_val"), ",")
arrdropdown="<select name=""02_compare"" onchange=""document.dropdownform.submit()"">"
for yindex=0 to Ubound(listarr)
arrdropdown=arrdropdown&"<option value=""" & listarr(yindex) &""""
arrdropdown=arrdropdown&">" &listarr(yindex) &"</option>"
response.write("<form name=""dropdownform"" method=""get"">")
But incase I refresh the target page before changing the dropdown values, the dropdown list is retained. Also if only the form populating the dropdown list is posted from parent page, the list is retained.
Can anyone tell me what happens after the second submit, how and why does the session variables get overwritten?
Thanks for you help in advance.
Last edited by joyk; March 26th, 2003 at 08:47 AM.
March 25th, 2003, 02:24 PM
I don't quite understand your first statement and the code that goes along with it?
You say you submit two forms, one to a target page and one to the same page? I don't think this is possible. If you are using multiple windows or frames you need to make it clear.
What is in "SubmitCompareToTarget();" is this the first submit?
March 26th, 2003, 06:41 AM
yes "SubmitCompareToTarget();" is the first submit, with get method to a target page in a second window. The second is a post to itself.
The target page and the main page are in two windows.
Both form does get submitted; but the only problem I face is the data collected in the session variable, in the target page vanishes when I change the dropdown.
Last edited by joyk; March 26th, 2003 at 06:43 AM.