Replacing Cal button with image

Moderators: Calcifer, slothy

Replacing Cal button with image

Postby essexgou » Wed May 30, 2007 6:29 pm


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)">

Posts: 6
Joined: Wed May 30, 2007 6:12 pm

Postby essexgou » Tue Jun 05, 2007 10:56 pm

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.
Posts: 6
Joined: Wed May 30, 2007 6:12 pm

Return to Calendar script questions

Who is online

Users browsing this forum: No registered users and 3 guests