Page 1 of 1

Replacing Cal button with image

PostPosted: Wed May 30, 2007 6:29 pm
by essexgou

To fit in with the overall look of my site, I wanted to put a calandar image instead of the Cal button. However, when I try this, the image does not show up on the live form and when I click it, the calendar opens and closes straight away.... Can you help?

I have added the following image input:
<input name="button" type="image" src="/images/date.gif" onclick="displayCalendar(document.forms[0].theDate2,'dd/mm/yyyy',this)">


PostPosted: Tue Jun 05, 2007 10:56 pm
by essexgou
I have found out how to do this, an example:
Instead of:
<input type="button" value="Calendar" onclick="displayCalendar(document.forms[0].theDate2,'',this)">

<a href="#" onClick="displayCalendar(,'',this);return false"><img src="images/cal.gif" >

where images/cal.gif is your image file path and image name.

Works a treat.