My concept is to load contents of a div on other div in html. In short I want to learn how the new Facebook inbox works, when we click on a message on the right, the contents a
if you are using jquery you can use onclick event on a div.
This is the HTML/JS this work like this.
Document Title
Click me
Click me
and let say we have a PHP file named ajax.php will return a json like we especified before in the ajax function dataType: 'json' and we are sending an ID through POST so here are a example you have to work it on it.
ajax.php
' . $message . '';
header('Content-Type: application/json');
echo json_encode( $json );
?>