I am trying to pass the data through window.location, the data is available in del(id,img,album).
I want to send multiple values through window.location as
window.location="save.php?type=deldownload&album="+album&id="+id;
But this does not work, but this code below works.
function del(id,img,album){
var where_to= confirm("Do you really want to delete "+img+" image");
if (where_to== true)
{
window.location="save.php?type=deldownload&id="+id;
}
else
{
alert('Ok! You Can continue with this Album');
}
}
Please tell what the real problem is.
I am trying to pass the data through window.location, the data is available in del(id,img,album).
I want to send multiple values through window.location as
window.location="save.php?type=deldownload&album="+album&id="+id;
But this does not work, but this code below works.
function del(id,img,album){
var where_to= confirm("Do you really want to delete "+img+" image");
if (where_to== true)
{
window.location="save.php?type=deldownload&id="+id;
}
else
{
alert('Ok! You Can continue with this Album');
}
}
Please tell what the real problem is.
Share Improve this question edited Sep 21, 2012 at 13:39 Chad Ferguson 3,0875 gold badges37 silver badges42 bronze badges asked Sep 21, 2012 at 8:53 user1688258user1688258 412 silver badges6 bronze badges1 Answer
Reset to default 6You missing few quotes
window.location="save.php?type=deldownload&album="+album+"&id="+id;
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744872006a4598315.html
评论列表(0条)