jQuery selector loads images from server
Posted
by Guillaume
on Stack Overflow
See other posts from Stack Overflow
or by Guillaume
Published on 2010-04-28T19:56:10Z
Indexed on
2010/04/28
20:07 UTC
Read the original article
Hit count: 221
Hi! here is the code:
<script type="text/javascript">
var ajax_data =
'<ul id="b-cmu-rgt-list-videos"><li><a href="{video.url}" '+
'title="{video.title.strip}"><img src="{video.image}" '+
'alt="{video.title.strip}" /><span>{video.title}</span></a></li></ul>';
var my_img = $(ajax_data).find('img');
</script>`
ajax_data is data from a JS template engine where I need to get some part of it. The problem is that jQuery does a GET on the
img src={video.image}: GET /test/%7Bvideo.image%7D HTTP/1.1
(on Firefox Live HTTP headers).
This GET generates a 404 from the server.
Any clues on how to solve this? Thanks a lot :)
© Stack Overflow or respective owner