I’m trying to inject HTML code downloaded from URL into my page.
Here the JQuery code
$('#messageScreen').live('pageshow', function() {
$('#messageContent').empty();
var url = testServerDirAdrs + 'message?message_id=' + selectedMessageId;
$.get(url,
function(data){
$('#messageContent').append(data).trigger('create');
},'html');
});
It works fine, but when downloaded html contains images, they are not displayed.
The image tag downloaded from the URL is:
<img src="/images/logos/muni_1_small.png" />
I guess the problem is with the path.
Any idea how can I solve this problem?
Thanks, Costa.
Below you can find 2 possible solutions:
I hope this helps.