Before you develop any application, you should have a clear idea of how it's going to work. As you build, potential enhancements and usability issues no doubt will present themselves, and your idea will evolve. But before you begin, you should know what you are building. Often, I draw flowcharts, using Freehand MX, or just paper and pencil.
For this application, you can go online and see the completed version of the application. Once you know where you are headed, the steps you will take to get there make a lot more sense.
In a browser, open http://www.allectomedia.com/newland_dynamic/tours.asp, enter email@example.com as the username, enter osiris as the password, and click Submit.
The log-in is something you won't implement for several more lessons.
Without clicking, roll your cursor over the world region links and the View all tours link near the bottom.
Notice that the page contains three different ways to access the tour descriptions. You can display all of the tours from a world region. You can display all of the tours for a given country. Or you can display all of the tours unfiltered by clicking the View all tours link.
When you roll over the links that filter by world region, you see that the URL parameter regionID=1 (or another number) is appended to the URL. Not surprisingly, the SQL statement on the descriptions page (tour_detail.asp) filters using this parameter. But when you roll over the View all tours link, no URL parameter appears. Since no data filtering is taking place when users click this link, there is no need to send any special data to the next page.
As you have (hopefully) guessed, if you choose an individual country from the menu and click Submit, then that data is sent as a form variable and used to filter descriptions on the next page. The list of countries in this menu is, of course, dynamically generated, so that the list is always up-to-date.
Click a few different links and submit the form a couple of times so you get the feel for how the search and display pages work together.
Pay special attention to the URL. Notice that it contains only URL parameters when you click one of the world region links. It has no parameters when you access the page through the form, and no parameters when you access the page through the View all tours link. Notice also that you can get tours to any given country to show up in each of the three ways.
From any country's description, click the Tour Price Calculator link.
Notice that the drop-down menu that displays the tour names reflects the tour you were looking at before you clicked the link. That is, if you were reading the Highlights of Morocco tour description and click the Tour Price Calculator link, Highlights of Morocco will be preselected in the menu. This is possible in part thanks to the URL parameter (in the case of Highlights of Morocco, it's tourID=17).
In the lesson introduction, I mentioned that you would make the two applicationsthe search and display pairing for the tour descriptions and the tour price calculatorwork together. You'll set up this collaboration later in this lesson.
Again, remember that as long as the database is maintained, the site will always display all of the tours Newland offers, and the display will meet whatever search criteria users select.
When you are finished exploring, close the browser and return to Dreamweaver.