Hi,
I would like to know if my approach is efficient and correct. my code is not working though, I don't know why.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(document).ready(function() {
function HotelQuery(HotelName) {
switch (HotelName) {
case 'TimelessHotel':
var strHotelName = 'Timeless Hotel';
var strHotelDesc = 'Hotel Description Timeless Hotel';
var strHotelPrice = ['980.00', '1,300.00', '1,600.00', '1,500.00', '1,800.00', '300.00', '150.00', '200.00'];
var strHotelRoomType = ['Single Room', 'Delux Room','Twin Room', 'Matrimonial Room', 'Presidential Suites', 'Extra Bed', 'Free Breakfast', 'Extra Person'];
; //end Timeless Hotel
case 'ParadiseInn':
var strHotelName = 'Paradise Inn';
var strHotelDesc = 'Hotel Description Paradise Inn';
var strHotelPrice = ['980.00', '1,300.00', '1,600.00', '1,500.00', '1,800.00', '300.00', '150.00', '200.00'];
var strHotelRoomType = ['Single Room', 'Delux Room','Twin Room', 'Matrimonial Room', 'Presidential Suites', 'Extra Bed', 'Free Breakfast', 'Extra Person'];
; //end Paradise Inn
case 'TetrisHotel':
var strHotelName = 'Tetris Hotel';
var strHotelDesc = 'Hotel Description Tetris Hotel';
var strHotelPrice = ['980.00', '1,300.00', '1,600.00', '1,500.00', '1,800.00', '300.00', '150.00', '200.00'];
var strHotelRoomType = ['Single Room', 'Delux Room','Twin Room', 'Matrimonial Room', 'Presidential Suites', 'Extra Bed', 'Free Breakfast', 'Extra Person'];
; //end Tetris Hotel
case 'JamstoneInn':
var strHotelName = 'Jamstone Inn';
var strHotelDesc = 'Hotel Description Jamstone Inn';
var strHotelPrice = ['980.00', '1,300.00', '1,600.00', '1,500.00', '1,800.00', '300.00', '150.00', '200.00'];
var strHotelRoomType = ['Single Room', 'Delux Room','Twin Room', 'Matrimonial Room', 'Presidential Suites', 'Extra Bed', 'Free Breakfast', 'Extra Person'];
; //end Jamstone Inn
}
};
});
</script>
<title>hotel query</title>
</head>
<body>
<a href="#" onclick="javascript: HotelQuery('TetrisHotel'); alert: (strHotelName, strHotelDesc, strHotelPrice);">Tetris Hotel Query</a>
</body>
</html>