ok i have changed the code to this
PHP Code:
<td>
<form name="contact" method="post" action="">
<div>
<input type="hidden" id="<?php echo $id; ?>" value="<?php echo $id; ?>"/>
<input type="submit" class="button" name="action" value="Viewed"/>
</div>
</form>
</td>
how do i get the value of the submit button i clicked
PHP Code:
$(function() {
$(".button").click(function() {
var id = $("#eid").val();
alert (id);
var dataString = 'id='+ id;
$.ajax({
type: "POST",
url: "process.php",
data: dataString,
success: function() {
alert (dataString);
}
});
return false;
});
});
runOnLoad(function(){
$("input#name").select().focus();
});
I know this line need to be change var id = $("#eid").val();
but im not sure what to change it two.
also what does this code mean
PHP Code:
runOnLoad(function(){
$("input#name").select().focus();
});