Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get info from posted form? 1

Status
Not open for further replies.

rtshort

IS-IT--Management
Feb 28, 2001
878
US
I have a ComboBox that fills by a query in the Window_OnLoad()Event. In the ComboBox_OnChange()Event, I submit the form to another one called "FillCombo2.asp", so I can run another query and fill the second ComboBox. The query runs fine and gets the required information on the FillCombo2.asp page. How do I get the information back to the original page and preserve what was in the 1st ComboBox? Rob
Just my $.02.
 
To keep the value of a combo box you would do it like this:

<select name=&quot;select&quot;>
<option value=&quot;1&quot;<%If Request.Form(&quot;select&quot;) = &quot;1&quot; then Response.Write &quot; selected&quot;%>>1</option>
</select>

On your FillCombo2.asp page you can use sessions to store whatever you need. An even better way to do this would be to have the first page submit itself back to itself with a querystring..

FillCombo1.asp?action=combo2

Then do an if statement to check and see if that querystring is there and then you can keep your form values on that page too, without having to store them in a session etc..

www.vzio.com
ASP WEB DEVELOPMENT



 
Thanks snowboardr, I'll give that a try. Rob
Just my $.02.
 
snowboardr, can you break this down a little for an idiot like me? LOL

FillCombo1.asp?action=combo2

Rob
Just my $.02.
 
Sorry.. email notification isnt working anymore.

strAction = Request.QueryString(&quot;action&quot;)

If strAction = &quot;combo2&quot; then
'load combo here&quot;
End if www.vzio.com
ASP WEB DEVELOPMENT



 
Thanks a Million!!!! Rob
Just my $.02.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top