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.
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)...????

<script type="text/javascript">
function showUser(str)
if (str=="")
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  if (xmlhttp.readyState==4 && xmlhttp.status==200)

<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() {
<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 align="center" id="txtHint"><h1>Images information will be listed here.</h1></div>
<table align="center"><tr><td>  

You can use an extra parameter in your showUser() javascript function and pass the type of operation as the second parameter,
Change the function as,

function showUser(str, op){

Modify all call to showUser as

<input type="button" name="edit" value="Assign" id="edit" style="background-color:#A7C942; color:#ffffff; font-size: 1.2em;" onclick="showUser(this.value, 'edit')">

and so on.

Now in the showUser() function at line 25 pass both the str and op as


and in useajax.php you can read both the str and op
Hope this was helpful

thank u i got it