开发者

javascript onchange event with calendar control

I'm trying to get a javascript ev开发者_如何学Cent 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>
}   


window.location isn't a function, but an object. Use

window.location = newLocation;

(See MDC and W3C spec)


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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜