This line
jq("#description" + tourId).html('<b>Opis: </b> '+ data);
works fine in IE, Firefox and Opera.
But this
jq("#images" + tourId).html('<img src=\"img\\gbflag.png\"/>');
works only in IE. Firefox and Opera do not show the image. Do you know why?
This is the rest of my code:
<script type="text/javascript">
var jq = jQuery.noConflict();
function showImages(tourId) {
jq(function() {
jq.post("/TourWebSpring/tourImages.html",
{tourId: tourId},
function(data) {
...
...
jq("#images" + tourId).html('<img src=\"img\\gbflag.png\"/>');
});
});
}
function showDetails(tourId) {
jq(function() {
jq.post("/TourWebSpring/tourDetail.html",
{tourId: tourId},
function(data) {
...
jq("#description" + tourId).html('<b>Opis: </b> '+ data);
});
});
}
I believe the problem may be that you are using the wrong slash after the
imgdirectory, and I don’t believe you need to escape the double quote since you are defining the string with single quotes. Try: