Jump to content

why the php form redirect to the next page when click at the javascript calendar

- - - - -

  • Please log in to reply
No replies to this topic

#1
faith89

faith89

    Newbie

  • Members
  • PipPip
  • 14 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>








1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users