[eluser]xwero[/eluser]
[quote author="mahuti" date="1194395902"]
Code:
<!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>
<title>test</title>
<scri+pt src="<?=base_url()?>scripts/jquery-1.2.1.js" ></scri+pt>
<scri+pt languge="javascript" type="text/javascript">
$(function(){ // added
$('.delete').click(function(){
$.ajax({
type: "POST",
url: "/index.php/test_ajax_controller/delete",
data: "id="+$(this).prev().text(),
success: function(html){
$("#show").html(html);
}
});
return false
});
}); // added
</scri+pt>
</head>
<body>
<table>
<tr><td>filename</td><td>other info</td><td><span class="hidden">3</span><input type="submit" class="delete" value="delete"></tr>
</table>
<br />
<br />
<p>
<div id="show"></div>
</p>
</body>
[/quote]
I've added 2 lines that should make it work.