Rank: Newbie Groups: Member
Joined: 5/13/2008 Posts: 6
|
How come some properties set the specified CssClass and some wont?
eo:Calendar runat="server" ID="CalendarFreightDate" Enabled="true"> <CalendarStyle CssClass="eo_Cal" /> <TitleStyle CssClass="eo_Cal_Title" /> <DayHeaderStyle CssClass="eo_Cal_DayHeader" /> <DayStyle CssClass="eo_Cal_Day" /> </eo:Calendar>
generates:
_eofcd_n([[[,"ctl00_WideContentPH_MainContentPH_CalendarFreightDate","Calendar", [... bla bla bla ...] ,"december"],,,,"2008-05-01",,,,,,,,,,,,,,,,,,,,,,,,,,,,,"eo_Cal_DayHeader",,,,,,,,,,"eo_Cal_Day",,,,,,"eo_css_ctrl_ctl00_WideContentPH_MainContentPH_CalendarFreightDate2", [... bla bla bla ...] %3C%44')));
eo_Cal, eo_Cal_Title and eo_Cal_DayHeader respectively are set properly where they should be, i.e. in the generated html code and not in the generated js code.
Thank you, Fredrik Johansson
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
This is normal. Values that needed by our JavaScript code are set in the generated js code; values that are not needed by our JavaScript code are set on the corresponding HTML element directly.
Usually a value is needed by JavaScript when it may change at runtime. For example, DayStyle and DayHoverStyle can apply to the same day cell and they are switched dynamically by JavaScript at runtime depending on where the mouse is. In this case our JavaScript code needs to know both values so that it can correctly switch them.
|