Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-03-2007, 10:18 AM
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-03-2007, 05:48 PM
Member
 
Join Date: Apr 2007
Location: Indiana
Posts: 84
pegitha is on a distinguished road
Send a message via Skype™ to pegitha
the <img /> tag will allow you to have an onclick="" element in it. Use that to call the javascript.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting multiple banded image into single banded image... Image enhancement archanajathan Advanced Java 0 01-08-2008 06:29 PM
SWT Button JavaForums Java Blogs 0 12-31-2007 05:53 PM
how to display image in jsp page(Struts) rama6262 Advanced Java 1 12-21-2007 08:50 AM
Struts - Solutions for creating Wizards Larry Web Frameworks 1 07-11-2007 06:59 PM
Struts, Some API to obtain wide and the high one of an image? Eric Web Frameworks 1 06-07-2007 06:06 AM


All times are GMT +3. The time now is 11:47 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org