I want to show a dialog which gets its content from server dynamically using ajax. If I use this
$('a.key').click(function(){
var resp = 'grk';
$dialog.html(resp);
$dialog.dialog('open');
return false;
});
everything is perfect. When I click the link it shows me the dialog box. But If I try to do what I want which is to call ajax to fill the dialog content. It just does not work. I am very new to jquery please help.
This is the code that I use to call ajax and it does not work.
$('a.key').click(function(){
var resp = 'grk';
resp = $.ajax({
type: "GET",
url: "/cms/getdata",
success: function(msg){
}).responseText;
$dialog.html(resp);
$dialog.dialog('open');
return false;
});
Thank you..
.responseTextat the end of your.ajaxcall in the non-working code? You also have some brace-parenthesis mis-matches I would look in to first before you get too far debugging.