Jump to content

The page loading to the next page when click the javascrip calendar


pollysal

Recommended Posts

can someone help me by telling me why is that whenever i click the javascript calendar, it redirect me to another page eventhough i still do not finish fill the form?

 

here is the code:

 


<?php
session_start();

$_SESSION['checkin']=$checkin;
$_SESSION['checkout']=$checkout;
$_SESSION['rooms']=$rooms;
$_SESSION['adults']=$adults;
$_SESSION['children']=$children;

?> 

<!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>
<link rel="stylesheet" type="text/css" media="all" href="calendar-win2k-1.css" title="win2k-cold-1" />
<script type="text/javascript" src="Kalendar/calendar.js"></script>
<script type="text/javascript" src="Kalendar/calendar-en.js"></script>
<script type="text/javascript" src="Kalendar/calendar-setup.js"></script>
<script type="text/javascript" src="Kalendar/ew.js"></script>
<script type="text/javascript"></script>
<title>SistemAPOS</title>
<style type="text/css">
<!--
.style7 {color: #FFFFFF}
.style8 {
color: #000000;
font-weight: bold;
}
.style10 {color: #FFFFFF; font-weight: bold; }
.style11 {font-weight: bold}
-->
</style>

</head>

<body>

<form action="findroom.php" method="post">

  <p>Check Room Availability</p>
  <p>Check In
    <label>
      <input type="text" name="checkin" value="<?php $checkin ?>"/>
      <input name="datein" type="image" id="dateA" src="Kalendar/ew_calendar.gif" width="16" height="15" border="0" />
  <script type="text/javascript">
				</script>
            </strong>
  <script type="text/javascript">Calendar.setup(
				{
					inputField : "datein", // ID of the input field
					ifFormat : "%Y-%m-%d", // the date format
					button : "dateA" // ID of the button
				}
				);
				document.write(ifFormat);
				</script>
      </label>
  </p>
  <p>Check Out 
    <input name="checkout" type="text" id="checkout" value="<?php $checkout ?>"/>
    <input name="dateout" type="image" id="dateB" src="Kalendar/ew_calendar.gif" width="16" height="15" border="0" />
    </strong>
    <script type="text/javascript">Calendar.setup(
				{
					inputField : "dateout", // ID of the input field
					ifFormat : "%Y-%m-%d", // the date format
					button : "dateB" // ID of the button
				}
				);
				document.write(ifFormat);
				</script>
  </p>
  <p>Rooms : 
    <label>
    <select name="rooms" id="rooms" value="<?php $rooms;?>">
      <option>1</option>
      <option>2</option>
      <option>3</option>
      <option>4</option>
      <option>5</option>
    </select>
    </label>
  Adults Per Room : 
  <label>
  <select name="adults" id="adults" value="<?php $adults;?>">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option value="5">5</option>
  </select>
  </label>
  Children Per Room : 
  <label>
  <select name="children" id="children" value="<?php $children;?>">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option value="5">5</option>
  </select>
  </label>
  </p>
  <p>
    <label>
      <input type="submit" name="Check" id="Check" value="Submit" />
    </label>
  </p>
</form>
</body>
</html>


Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.