PDA

View Full Version : changing form button to an image - not working


deathmill
09-10-2004, 12:00 PM
Hi,

Did a search on forms and drops downs and not much found....

Im sure this is very simple, but for me is way odd...

Form below works fine. But if I change <input type="button" to <input type="image" it just refreshes the page and doesn't work. How do I get this to work with an image as the submit button..

<form name="htmlMenu">
<select name="htmlSelList" size="1">
<option selected value="#">Select a page, then Go!
<option value="index1.htm">1</option>
<option value="index2.htm">2</option>
<option value="index3.htm"3</option>
<option value="index4.htm">4</option>
<option value="index5.htm">5</option>
</select>
<input type="button" onClick="document.location = document.htmlMenu.htmlSelList.options [document.htmlMenu.htmlSelList.selectedIndex].value;"
value="GO">
</form>

Much appreciated..

D

A1ien51
09-10-2004, 01:45 PM
<button style="background-image:url(asdf.gif)" onclick="zxcv()">qwerty</button>

Eric

glenngv
09-10-2004, 01:50 PM
Or:

<input type="image" src="btn.gif" onclick="zxcv();return false" />

or:

<a href="#" onclick="zxcv();return false"><img src="btn.gif" border="0" /></a>