Hi,
I'm having a problem using the jquery $.ajax() function. Okay, as far as i know the function can only place the HTML retrieved into an element (by using callback function). However, i didn't really want to use this. I wish that i could return the HTML tags retrieved within a function call. Let's say i do it like this :
function getHTML(url){
$.ajax({
.. configurations and so on ...,
success:function(data){
// how do i return the data to the getHTML function?
}
});
}
thanks for any advice.
I'm having a problem using the jquery $.ajax() function. Okay, as far as i know the function can only place the HTML retrieved into an element (by using callback function). However, i didn't really want to use this. I wish that i could return the HTML tags retrieved within a function call. Let's say i do it like this :
function getHTML(url){
$.ajax({
.. configurations and so on ...,
success:function(data){
// how do i return the data to the getHTML function?
}
});
}
thanks for any advice.