i have a function,
function showimage(a)
{
$("#lightboxholder").show("fast");
$('#lightboximage').attr('src', 'images/demo/190x90.gif');
}
when i go to localhost/svce and view in gallery.php, it doesnt show me the image, however if i replace $('#lightboximage').attr('src', 'images/demo/190x90.gif'); by $('#lightboximage').attr('src', 'http://localhost/svce/images/demo/190x90.gif');
then it shows me the image, sorry for my bad english, thanks
You’re changing the
srcto a relative URL. So if your current page ishttp://localhost/foo/bar, the browser will try to find the image athttp://localhost/foo/bar/images/demo/190x90.gif. Use an absolute URL, like/svce/images/demo/190x90.gif.