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

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -