boogyman
04-20-2009, 08:37 PM
I wanted to try and port over all of my input buttons to actual buttons, however I've found that upon being clicked they will submit the form. I was under the impression that this would only happen if type="submit" was set.
example:
<button onclick="popUpCalendar(document.getElementById('date').value)">
<img src="/images/icons/calendar.jpg" alt="Choose Date">
</button>
For novelty sake, I also tried replacing the <img> with just the alternate text, as well as explicitly assigning type="button", but same action occurs.
Upon initialization, the button is supposed to create a modal window and display a calendar with various options, however none of them involve submitting the form.
example:
<button onclick="popUpCalendar(document.getElementById('date').value)">
<img src="/images/icons/calendar.jpg" alt="Choose Date">
</button>
For novelty sake, I also tried replacing the <img> with just the alternate text, as well as explicitly assigning type="button", but same action occurs.
Upon initialization, the button is supposed to create a modal window and display a calendar with various options, however none of them involve submitting the form.