Categories | Question details Back To List | ||
Scheduler + IE rendering problem I have been playing around with scheduler for almost a month. and In most of the case ,It worked without a hitch. and then I tried it with IE 8 and suddenly everything messed up. I have given my snippet below. please have a look @ it. <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <% String from = request.getParameter("from"); String to = request.getParameter("to"); int from_day = 0; int from_month = 0; int from_year = 0; if (to != null && from != null) { DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.sss"); java.util.Date todate = (java.util.Date) formatter.parse(to); java.util.Date fromdate = (java.util.Date) formatter.parse(from); // Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance(); cal.setTime(todate); //to_day = cal.get(Calendar.DATE); //to_month = cal.get(Calendar.MONTH) ; //to_year = cal.get(Calendar.YEAR); cal.setTime(fromdate); from_day = cal.get(Calendar.DATE); from_month = cal.get(Calendar.MONTH); from_year = cal.get(Calendar.YEAR); } %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> <script src="dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script> <script src="dhtmlxscheduler_debug.js" type="text/javascript" charset="utf-8"></script> <link rel="stylesheet" href="dhtmlxscheduler.css" type="text/css" charset="utf-8"> <style type="text/css" media="screen"> html, body{ margin:0px; padding:0px; height:100%; overflow:hidden; } </style> <script type="text/javascript" charset="utf-8"> function init() { scheduler.config.xml_date="%Y-%m-%d %H:%i"; scheduler.config.lightbox.sections=[ { name:"description", height:130, map_to:"text",type:"textarea" , focus:true}, { name:"location", height:43, map_to:"details", type:"link"}, { name:"time", height:72, type:"time", map_to:"auto"} ] scheduler.config.first_hour=0; scheduler.locale.labels.section_location="Description"; scheduler.locale.labels.section_description="Event"; //scheduler.config.details_on_create=0; //scheduler.config.details_on_dblclick=0; //scheduler.config.show_loading=true; //alert(scheduler.config.dblclick_create); scheduler.config.dblclick_create=0; scheduler.config.multi_day = true; //scheduler.config.drag_create=0; scheduler.init('scheduler_here',null,"month"); // scheduler.load("bmdata.jsp"); //scheduler.setLoadMode("month"); //scheduler.load("/bm_events.do?from=2009-07-03 00:05&to=2009-09-13 00:05"); //scheduler.load("/bm_events.do?from=+"+'<%=from%>'+"&to="+'<%=to%>'); <%if (from_year != 0 && from_month != 0 && from_day != 0) {%> scheduler.load("/bm_events.do?from=+"+'<%=from%>'+"&to="+'<%=to%>'); var myDate=new Date(); //myDate.setFullYear(2009,6,3); myDate.setFullYear(<%=from_year%>,<%=from_month%>,<%=from_day%>); scheduler.setCurrentView(myDate,"month"); <%} else {%> scheduler.load("/bm_events.do"); <%}%> //scheduler.load("/bm_events.do"); var dp = new dataProcessor("/bm_events.do"); dp.init(scheduler); } scheduler.form_blocks["link"]={ render:function(sns){ return "<a href=\"#\"></a>"; }, set_value:function(node,value,ev){ node.href = value; node.innerHTML=ev.text; }, get_value:function(node,ev){ return node.href; }, focus:function(node){ } } scheduler.attachEvent("onBeforeLightbox", function (event_id){ scheduler.form_blocks.textarea.set_value=function(node,value,ev){ node.firstChild.value=value||""; node.firstChild.disabled = "true"; // or just = true; to disable for all events } return true; //any custom logic here }); </script> </head> <body onload="init();"> <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'> <div class="dhx_cal_navline"> <div class="dhx_cal_prev_button"> </div> <div class="dhx_cal_next_button"> </div> <div class="dhx_cal_today_button"></div> <div class="dhx_cal_date"></div> <div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div> <div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div> <div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div> </div> <div class="dhx_cal_header"> </div> <div class="dhx_cal_data"> </div> </div> </body> </html> Answer posted by Stanislav (support) on Oct 12, 2009 05:29 There is no any serious problems with above code, it works normally in IE , except of one thing { name:"description", height:130, map_to:"text",type:"textarea" , focus:true}, need to be changed as { name:"description", height:130, map_to:"text",type:"textarea"}, You are disabling text area, and attempt to set focus for disabled element causes js error in IE Answer posted by Prashant on Oct 12, 2009 05:53 Thanks, good work Guys. |