[DisplayTag]how to add javascript to the table, asks for confirmation[Y/N]?

Hi there,

with reference to displayTag, does anyone know how to add a javascript to the table that asks for 'delete confirmation'?

<display:column property="action"title="Delete" href="./fileDelete.do" paramId="fileID" paramProperty="filesId" />

thank you

[413 byte] By [xianwinwina] at [2007-11-26 18:08:08]
# 1

Try something like this.

<display:column class="unnamed1" bgcolor="#CDE6EB" align= "center" href="_javascript_:deleteConfirm('${row.id} ')"/>

and in the deleteConfirm javascript method, based on the response, call the delete.do action.

If row.id doesn't work, try row.uid.

Hope it helps although it is 2 months since your question.

kpksuna at 2007-7-9 5:39:44 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
thanks for the tip. actually you were right, I used the row.id and it worked.thanks again for posting.
xianwinwina at 2007-7-9 5:39:44 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...