hi all,
i had a php page.i am using ajax for displaying a table.
When i select a date images uploaded on that date gets displayed in a table.This is working fine.But i need another button for edit.so when i click on edit those images present in table should become editable.
(OR)
i am passsing a date value through url in line25. so can we pass button value also in the same url(which is in line53)...????
<html>
<script type="text/javascript">
function showUser(str)
{
if (str=="")
{
document.getElementById("txtHint").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","useajax.php?q="+str,true);
xmlhttp.send();
}
</script>
<head>
<link rel="stylesheet" type="text/css" href="css/table.css"/>
<meta charset="UTF-8" />
<link rel="stylesheet" href="css/base.css" type="text/css" media="all" />
<link type="text/css" href="css/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="jquery-1.4.2.js"></script>
<script type="text/javascript" src="ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="ui/jquery.ui.datepicker.js"></script>
<link type="text/css" href="css/demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$("#datepicker").datepicker();
});
</script>
</head>
<body>
<form action="imageslist.php" method="post">
<table align="right">
<tr> <td></td>
<td></td><td><a href="logout.php"><h2>Logout</h2></a></td></table>
<div class="demo" align="left">
<h2>Choose Uploaded date <input name="dates" type="text" id="datepicker" onchange="showUser(this.value)">
<input type="button" name="edit" value="Assign" id="edit" style="background-color:#A7C942; color:#ffffff; font-size: 1.2em;" onclick="showUser(this.value)"></h2>
</div>
<br>
<div align="center" id="txtHint"><h1>Images information will be listed here.</h1></div>
<table align="center"><tr><td>
</table>
</form>
</body>
</html>