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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cascaded dropdown lists in the same ASP page 1

Status
Not open for further replies.

techzone12

Technical User
Joined
Aug 24, 2005
Messages
32
Location
US
I want to have multiple frames within a single ASP/HTML page.

The idea is that one frame will have a drop down menu and a submit button. When the submit button is clicked, the second frame should display. The second frame will have the dynamic content based on the selection that was made in the first. In other words the action is handled in the second frame (rather that a second ASP page).

Is this possible? Or should I just use tables within the same page. Then show/hide tables with VB programming.

I would appreciate any hints. Thanks
 
Certainly it is possible to display a document in another frame using the data submitted from a form in one frame. The frames all have names and these names can be used in the TARGET attribute of the <FORM> tag; or in Javascript. Let the name of the second frame be DisplayResults, then-

Code:
<html>
...
<form action="results.asp" target="DisplayResults">
...
</html>

or

<code>
...
<script>
...
parent.DisplayResults.location.href = "results.asp";
...
</script>
...
</code>


This is a nice approach because it avoids the blip that occurs while moving from one version of a page to another. Only the contents of the target frame change while the other frames remain constant.
 
This looks simple, thank you. I will try it.

I want to take advatage of the opportunity and ask another related question.

In general, is using frames the best way to do this kind of stuff?. Or should I use multiple tables within the ASP page?. Or maybe there is another method that i don't know about.

Thanks again

 
I am not sure there is a "best" way. Why not try building the same function using different approaches and see how they work and whether you prefer one to the other. You might find that subtle differences in requirements are met better by frames or tables.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top