I've inherited some code and am trying to work through it. I have a basic search page that takes some parameters in text fields. It also has a html calendar component that comes up when it's icon is clicked:
<html: __ image src="icons/calendar.gif" onklick="select_date('meetingTime');" border="1" />
And of course it has a submit button at the bottom of the form.
Problem 1 - when entering something in one of the parameter text fields and hitting enter, instead of submitting the form, the claendar component comes up. I got around this by putting the following in my code at the top of the form:
<input__ type="submit" style="width:0px" onklick="" />
Now, hitting enter after a param is added submits the form. Problem solved, right? Not exactly - I get a side effect.
Problem 2 - Now when clicking the calendar component, it comes up properly and when a date is selected, the corresponding text box is populated with a formatted string of the date. If I want to change that date and click on the calendar icon again, the form submits itself, bypassing the rendering of my calendar component.