[eluser]Chris Newton[/eluser]
Yes, the script tag is called immediately above the jquery delete script. It looks like the forum stripped out the script tags, so it makes it a bit confusing.
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">
$('.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
});
</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>