| Re[2]: JSCalendar in AJAX Page ¶ | |
| I got around the "side-effect" (having to click twice for the calendar to appear) by implementing this slightly differently, and adding a bit of code to dispatch a second click event to the element that triggers the pop-up calendar: <input type='text' id='date' name='date' style='text-align: center;' size='10' maxlength='10' value='$date' onClick='calSetup_date(this)' readonly> | |
| Re[3]: JSCalendar in AJAX Page ¶ | |
| Well, a couple of typos, and there didn't seem to be a way to edit the original reply, so here's a corrected version of the html/js that gets inserted dynamically (the relevant parts, at least): <input type='text' id='date' name='date' style='text-align: center;' size='10' maxlength='10' value='' onClick='calSetup_date(this)' readonly> | |
| last |
| Re[4]: JSCalendar in AJAX Page ¶ | |
| OK, well, I discovered that the separate <script...> I was using doesn't work in Safari, so I had to switch things up so that it's similar to the method used in the original reply to this question: <input type='text' id='date' name='date' style='text-align: center;' size='10' maxlength='10' value='' onClick='Calendar.setup({align : "br", inputField : "date", ifFormat : "%Y-%m-%d", weekNumbers : false, step : 1}); var evt = document.createEvent("MouseEvents"); evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); this.dispatchEvent(evt);' readonly> | |
| last |














