javascript - Option for removing the uploaded files displayed using <g:downloadfile> tag -
i have used <g:downloadfile>
tag display list of uploaded files. display uploaded files list of downloadable links.
but have problem here, unable provide user, delete option if he/she wish delete uploaded file.
usage: <g:downloadfiles filelist="${filelist}" />
i think there should way out using jquery or javascript.
thanks in advance help.
below solution have written question:
gsp:
<g:each in="${filelist}" var="file"> <div class="remove"> <a href="#"> <span class="glyphicon glyphicon-remove"></span></a> <a href="/forms/landing/attachment/${file.attachmentid}" filename="${file.name}">${file.name}</a> </br> </div> </g:each>
jquery:
$(document).ready(function(){ $('.glyphicon-remove').click ( function(e){ e.preventdefault(); $(this).parent().parent().remove(); }); });
Comments
Post a Comment