I would like to show blog details when a link is clicked.
Here is part of the code I have.
".ajax" part
$.ajax({
url: 'someurl',
dataType: 'json',
success: function( response ) {
$( '#viewDialog > h1' ).html( response.title );
$( '#viewDialog > p' ).html( response.content );
$( '#viewDialog' ).dialog( 'open' );
}
});
".html" part
<div id="viewDialog" title="My Blog">
<h1></h1>
<p></p>
</div>
I am pretty sure I get the response from the server in the right json format.
Something like this
{"id":"120","title":"My new stuff","content":"Someting new","author_id":"11"}
When I clicked the link, the dialog window poped up but no information was shown in the window.
Did I do everything right?
Milo