Sorry, I didn't understand. Can you paste some sample code for what ou are doing? Dave.
Joined: Jul 02, 2001
Hi David This is my code <input type="button" name="BTN_LOV_FORMULA" style="BACKGROUND-IMAGE: url(file://H:\webapps\examples\jsp\Work\image\s_b_detl.gif) ; HEIGHT: 19px; WIDTH: 20px" where the path of the image is the absoulete path. where as my I need is a relative path like <input type="button" name="BTN_LOV_FORMULA" style="BACKGROUND-IMAGE: url(file://..\image\s_b_detl.gif) ; HEIGHT: 19px; WIDTH: 20px" for which I am not able to get the output of a image in the button. Regards, pradeep
Since this thread is 6 years old, I don't think the original poster minds that I'm stealing his thread
I have the following code:
editbutton.gif is in the same directory as the .jsp that contains the code. However, no luck. The button doesn't show the image. I tried numerous variations.. [ June 19, 2008: Message edited by: Jan Sterk ]
I don't think the <input type="button"> tag is what you're looking for. There are a few options that would be more fitting. <input type="image" src="image.gif"> functions as a button but shows an image. Or even the HTML4 spec using the <button></button> tags then you can put an <img> tag or any other text content in there as well.
So I'd recommend something like this:
Well at least if you don't mind having your event logic inside your HTML page. To make that even more noticeable as an actionable link, you could add onmouseover="this.src='image-hover.gif';" onmouseout="image.gif" to the image tag to make it a little more dynamic. [ June 19, 2008: Message edited by: Sean Bradshaw ]
Joined: Jun 06, 2008
Thank you all for your replies.
I'm taking Sean's route with <href><button>. Strange thing is, the href works fine with .html links, but not with servlet links.
On a click event, I want to go to a (front controller) servlet. It needs a few request parameters, but that can be done by creating a query string with EL.