javascript onchange event with calendar control
-
19-09-2019 - |
Question
I'm trying to get a javascript event to reload a page when I change a date using calendar control, but the page won't reload. Any idea how to do this?
this is what i have right now
<input type="text" name="start_date" onFocus="showCalendarControl(this);" value="#FORM.start_date#" onchange="changeDateReload(this.value);" />
function changeDateReload(newDate){
<cfoutput>
window.location("editBooking.cfm?booking_id='#URL.booking_id#'&req_mon={ts ''newDate' 00:00:00'}&req_time='#URL.req_time#'&req_room_id='#URL.req_room_id#'");
</cfoutput>
}
OTHER TIPS
i don't know whats the "<cfoutput>
" tag means in your script code.
Write the script function like that:
<script language="javascript" type="text/javascript">
function changeDateReload(newDate){
window.location = "editBooking.cfm?booking_id='#URL.booking_id#'&req_mon={ts ''newDate' 00:00:00'}&req_time='#URL.req_time#'&req_room_id='#URL.req_room_id#'";
}
</script>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow