IPD 356 - JavaScript Assignment

Due Tuesday, May 12th at 11:59 PM Central Time

For this assignment you will simulate a (admittedly very simple) travel agent site.

Create a page containing a form in which you ask the user for some information. You will then output the cost for their trip. Your form should have the following fields:

The business logic is as follows

What your function should do

Your code should let the user know the total cost of their trip and whether or not they need to bring a passport. For example, if a Canadian citizen wishes to go to Mexico City for 5 days ($200*5), wishes to travel first class ($400) and is traveling with their spouse, then their total cost is ($1000+$400)*2, to give a total of $2800. Because they are a Canadian citizen, they should also be reminded to travel with their passport. So your form should say something like:

"The estimated cost of your trip is $2800. Please note that you will need to bring your passport."

You must output this statement to a section on your page (e.g. a new 'div' section) using the innerHTML property discussed in one of the lectures.