how to check a folder in jquery

Posted by Klbaiju under jQuery on 3/15/2013 | Points: 10 | Views : 787 | Status : [Member] | Replies : 1
Hi All,
In my application
i want to ckeck a folder whether it contains a particular id or not
this is my code
Did is the folder.it contains 1.pdf,2.pdf,3.pdf,4.pdf,5.pdf.
but grid contains 2.pdf and 3.pdf
$("#<%=GridView1.ClientID%> tr td a").each(function () {
//this is working fine
var id = $(this).attr("id");
var id1 = id + ".pdf";


//below part is not working fine
if (id1 = '/Did/') {

$(this).find('img').attr('src', './Images/pdf_icon.png');
}

});

how it is possible
Regards
Baiju




Responses

Posted by: Jayakumars on: 3/17/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

change here
$(this).find('img').attr('src', '../Images/pdf_icon.png');

or
$(this).find('img').attr('src', '~/Images/pdf_icon.png');

Mark as Answer if its helpful to you

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response