Hi,
How to get the value passed using javascript in the next page. The code I have used is this.
cal.php
And I am trying to receive the value of date_id variable in the display.php page like this
display.php
But I am not able to get the date variable in the display.php page. Does anybody have an idea as how to do this.
With regards
How to get the value passed using javascript in the next page. The code I have used is this.
cal.php
Code:
<html>
<head>
</head>
<script type="text/javascript">
function Show(){
var date_id = document.getElementById("date_id").value;
//alert(date_id);
self.location='display.php?'+date_id;
}
<body>
<script type="text/javascript" src="date-picker.js"></script>
<form name="Calender1" action="display.php" method="POST">
<a STYLE="text-decoration: none" onmouseover="window.status='Date Picker';return true;" onmouseout="window.status='';return true;" href="javascript:show_calendar('Calender1.date_id')" >
<IMG title="calendar" height=21 src="iconCalendar.gif" width=30 border=0></a>
<input type="textbox" class="textBox" type="text" readonly name="date_id" id="date_id" size="10">
</form>
<input type="submit" value="UPDATE" onclick="Show()">
</body>
</html>
display.php
Code:
<?php $id = $_GET['date_id']; print $id; ?>
With regards
Comment