Click to See Complete Forum and Search --> : button as an image


camokat
06-07-2004, 10:28 AM
I tried posting this in HTML forum, but there are no takers for this.
I have a button form element and I want to paint it as an image:



<input type="button" name="search" value="search" class="btn" onClick="actionListener()">


I want to display image instead of an html button, changing code to:


<input type="image" src="images/search.gif" name="search" value="search" onClick="actionListener()">


does not work. How can I make image behave as button?

thanks,
webtekie

Vladdy
06-07-2004, 10:42 AM
How about some patience instead of cross-posting, huh?
Searching forums won't hurt either :rolleyes:

Bhanu
06-07-2004, 10:47 AM
Hi,
try window.submit(); in actionListener() function.
or call this actionListener() function in form tag and
<input type="image" src="images/search.gif" name="search" value="search" onClick="window.submit();">

Bhanu

Vladdy
06-07-2004, 10:48 AM
Originally posted by Bhanu
Hi,
try window.submit(); in actionListener() function.
or call this actionListener() function in form tag and
<input type="image" src="images/search.gif" name="search" value="search" onClick="window.submit();">

Bhanu
No need to do that if you know CSS

camokat
06-07-2004, 11:00 AM
Vladdy,

Mind sharing your wisdom with the rest?

Vladdy
06-07-2004, 11:03 AM
Already did. See your original post.