Icedan
11-30-2006, 04:28 AM
See this page: http://www.orient-explorer.com/Cityscape/
You will see each hotel has a button, each button has a value (hotel name it represents).
When you click on the button, you will go to the booking page, scrolling down, you can see the 1st Hotel Name, it has the name (or it should have the name) of the hotel you selected to book.
Here is the code:
The code on the index page, the button:
<input name="RitzCarlton" type="submit" id="HotelSelect" value="Click here to book this hotel">
The code on the booking page (in the head):
<%
Dim HotelName
Dim HotelSelect
if HotelSelect = Ritz then
HotelName = "Ritz Carlton"
if HotelSelect = Conrad then
HotelName = "Conrad Centennial"
else if HotelSelect = Marina then
HotelName = "Marina Mandarin"
else if HotelSelect = Meritus then
HotelName = "Meritus Mandarin"
else if HotelSelect = Carlton then
HotelName = "Carlton"
else if HotelSelect = Coleman then
HotelName = "Parkroyal on Coleman Street"
else if HotelSelect = Beach then
HotelName = "Parkroyal on Beach Road"
else if HotelSelect = Bayview then
HotelName = "Bayview"
else if HotelSelect = Dickson then
HotelName = "Dickson Court"
end if
end if
end if
end if
end if
end if
end if
end if
%>
And the code for the 1st Hotel:
<input name="HotelName" type="hidden" id="HotelName" value="<%= HotelName %>">
<%= HotelName %>
If you test the website, you can see that it seems to work, but for some reason, no matter what hotel button you push, you always get Ritz Carlton, what's going on?
You will see each hotel has a button, each button has a value (hotel name it represents).
When you click on the button, you will go to the booking page, scrolling down, you can see the 1st Hotel Name, it has the name (or it should have the name) of the hotel you selected to book.
Here is the code:
The code on the index page, the button:
<input name="RitzCarlton" type="submit" id="HotelSelect" value="Click here to book this hotel">
The code on the booking page (in the head):
<%
Dim HotelName
Dim HotelSelect
if HotelSelect = Ritz then
HotelName = "Ritz Carlton"
if HotelSelect = Conrad then
HotelName = "Conrad Centennial"
else if HotelSelect = Marina then
HotelName = "Marina Mandarin"
else if HotelSelect = Meritus then
HotelName = "Meritus Mandarin"
else if HotelSelect = Carlton then
HotelName = "Carlton"
else if HotelSelect = Coleman then
HotelName = "Parkroyal on Coleman Street"
else if HotelSelect = Beach then
HotelName = "Parkroyal on Beach Road"
else if HotelSelect = Bayview then
HotelName = "Bayview"
else if HotelSelect = Dickson then
HotelName = "Dickson Court"
end if
end if
end if
end if
end if
end if
end if
end if
%>
And the code for the 1st Hotel:
<input name="HotelName" type="hidden" id="HotelName" value="<%= HotelName %>">
<%= HotelName %>
If you test the website, you can see that it seems to work, but for some reason, no matter what hotel button you push, you always get Ritz Carlton, what's going on?