[eluser]ludo31[/eluser]
Hello ;
I would like to try this tutorial
http://mrforbes.com/blog/2009/01/a-quick...comment-99
I change some code in order to adapt it in my case but it doesn't work :
in my view :
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>jquery</title>
[removed][removed]
[removed]
function get_record_id(record_id) {
var p = {};
p[record_id] = record_id
$('#content').load(/welcome/method,p,function(str){
});
}
[removed]
</head>
<body>
<div id="content">
<p>If you click on me, I will disappear.</p>
</div>
</body>
</html>
in my controller :
Code:
public function method()
{
$record_id = $this->input->post('record_id');
$results = $this->essaijquerymodel->get_record($record_id);
//get the record from the database
$this->load->view('ajax_record',$results);
}
and in ajax recodr view
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ajax</title>
</head>
<body>
<?php if ($results != null):
foreach ($results as $r=>$value): ?>
The name associated with this record is: <?php print $value['titre'];?>
<?php endforeach;endif; ?>
</body>
</html>
did you know whta's wrong and where ??
thanks