View Single Post
  #1 (permalink)  
Old 05-03-2007, 10:18 AM
yuchuang yuchuang is offline
Member
 
Join Date: Apr 2007
Location: Singapore
Posts: 30
yuchuang is on a distinguished road
Send a message via MSN to yuchuang
creating an image button when using struts
Below is one of the column of my table:

Code:
<display:column title="Action" class="tabletext3" headerClass="mainpanel2header"> <logic:match value="1" name="researchPaper" property="docStatus"> <img src="<c:out value='${imagesPath}'/>/icon_unpublish.gif" alt="Unpublish" border="0" width="13"> </logic:match> <logic:notMatch value="1" name="researchPaper" property="docStatus"> <img src="<c:out value='${imagesPath}'/>/icon_modify.gif" alt="Modify" border="0" width="13"> <img src="<c:out value='${imagesPath}'/>/icon_publish.gif" alt="Publish" border="0" width="13"> <img src="<c:out value='${imagesPath}'/>/icon_delete.gif" alt="Delete" border="0" width="13"> </logic:notMatch> </display:column>
For those images, i want to make them into button so that when i click on them i will be able to call the javascript for a pop up window and when click ok, it will do the action that i wanted.

Below is the javascript i used for the pop up window:

Code:
function confirmUnpublish() { var r=confirm("Click OK to confirm unpublish") if (r) { url=" "; window.location.href=url; } else { return false; } }
Since i'm using struts, anyone knows how to do the image button?

Last edited by yuchuang : 05-03-2007 at 10:25 AM.
Reply With Quote
Sponsored Links