var fileExt = {};fileExt[0] = ".png";fileExt[1] = ".jpg";fileExt[2] = ".gif"; $.ajax({ url: 'http://localhost:55638/Content/Images/',
success: function (data) { $("#fileNames").html('
- '); debugger; //List all png or jpg or gif file names in the page $(data).find('a:contains(" + fileExt[0] + "),a:contains(" + fileExt[1] + "),a:contains(" + fileExt[2] + ")').each(function () { var filename = this.href.replace(window.location.host, "").replace("http:///", ""); $("#fileNames").append('
- ' + filename + '
- '); }); $("#fileNames").append('
Above is my code. i didn't even go to inside ajax call.
