pollysal Posted March 20, 2010 Share Posted March 20, 2010 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> Quote Link to comment https://forums.phpfreaks.com/topic/195883-the-page-loading-to-the-next-page-when-click-the-javascrip-calendar/ Share on other sites More sharing options...
optikalefx Posted March 20, 2010 Share Posted March 20, 2010 can't help you if your code doesnt run. we need absolute URLS to ur js and css files Quote Link to comment https://forums.phpfreaks.com/topic/195883-the-page-loading-to-the-next-page-when-click-the-javascrip-calendar/#findComment-1028954 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.