IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New here's the html for the control
[table id="DepartureTable" runat="server"]
[tr]
[TD align="right" width="40"]
[LABEL style="FONT-SIZE: 9pt"]From:[/LABEL]
[/TD]

[td width="190"]
[div id="DivDDF" runat="server"]
[radcln:raddatepicker id="RaddatepickerDDF" AllowEmpty="True" Runat="server"]
[DateInput AutoPostBack="True" HideOnBlur="True" Width="100px" RangeValidation="Immediate" DisplayPromptChar="_" PromptChar=" " EmptyMessage=" " style="float: left"][/DateInput]
[/radcln:raddatepicker]
[/div]
[/td]
[/tr]

[tr]
[TD align="right" width="40"]
[LABEL style="FONT-SIZE: 9pt"]To:[/LABEL]
[/TD]

[td width="190"]
[div id="DivDDT" runat="server"]
[radcln:raddatepicker id="RadDatePickerDDT" AllowEmpty="True" Runat="server"]
[DateInput AutoPostBack="True" HideOnBlur="True" Width="100px" RangeValidation="Immediate" DisplayPromptChar="_" PromptChar=" " EmptyMessage=" " style="float: left"][/DateInput]
[/radcln:raddatepicker]\t\t\t\t\t\t\t\t[/div]
[/td]
[/tr]
[/table]

===============================================

/* these statements do not work */
document.getElementById("RadDatePickerDDF").setAttribute("Enabled","False")
document.getElementById("RadDatePickerDDT").setAttribute("Enabled","False")
document.getElementById("RadDatePickerDDF").setAttribute("backgroundColor","a9a9a9")
document.getElementById("RadDatePickerDDT").setAttribute("backgroundColor","a9a9a9")
document.getElementById("RadDatePickerDDF").Enabled=false
document.getElementById("RadDatePickerDDT").Enabled=false

/* neither do these */
/* I figured that if I could just make it invisible, then I could live with it */\t\t\t\tdocument.getElementById("DivDDF").setAttribute("Visible","False")
document.getElementById("DivDDT").setAttribute("Visible","False")
DivDDT.Disabled=true;
DivDDF.Disabled=true;
document.getElementById("DivDDT").disabled=true
document.getElementById("DivDDF").disabled=true

lincoln

"Chicago to my mind was the only place to be. ... I above all liked the city because it was filled with people all a-bustle, and the clatter of hooves and carriages, and with delivery wagons and drays and peddlers and the boom and clank of freight trains. And when those black clouds came sailing in from the west, pouring thunderstorms upon us so that you couldn't hear the cries or curses of humankind, I liked that best of all. Chicago could stand up to the worst God had to offer. I understood why it was built--a place for trade, of course, with railroads and ships and so on, but mostly to give all of us a magnitude of defiance that is not provided by one house on the plains. And the plains is where those storms come from." -- E.L. Doctorow


Never apply a Star Trek solution to a Babylon 5 problem.


I am not merely a "consumer" or a "taxpayer". I am a Citizen of the United States.


[link|mailto:bconnors@ev1.net|contact me]
New That's not the html...
...that's the embedded aspx control code. You are operating under the assumption that these are part of the client DOM - and it's unlikely that they are. More likely, the third party control emits name-mangled html to the browser. If you want to disable this stuff on the browser, then you have to know what the actual html id's are on the client.

To view the HTML, do a view source on the browser after it has been emitted in the script.
New Forgive me
for not knowing that you wanted "after" HTML code, not the "before" code that I actually wrote.
lincoln

"Chicago to my mind was the only place to be. ... I above all liked the city because it was filled with people all a-bustle, and the clatter of hooves and carriages, and with delivery wagons and drays and peddlers and the boom and clank of freight trains. And when those black clouds came sailing in from the west, pouring thunderstorms upon us so that you couldn't hear the cries or curses of humankind, I liked that best of all. Chicago could stand up to the worst God had to offer. I understood why it was built--a place for trade, of course, with railroads and ships and so on, but mostly to give all of us a magnitude of defiance that is not provided by one house on the plains. And the plains is where those storms come from." -- E.L. Doctorow


Never apply a Star Trek solution to a Babylon 5 problem.


I am not merely a "consumer" or a "taxpayer". I am a Citizen of the United States.


[link|mailto:bconnors@ev1.net|contact me]
New Problem was that the code you wrote to disable...
...was client side javascript, so you need the client side html to figure out whether or not it would achieve the desired result.
New This is...
Legend:
"<" = "["
">" = "]"

Line breaks and unwrapping of lines have been done
to ease viewing of the code.
=========================================================================

[table id="DepartureTable"]
[tr]
[TD align="right" width="40"]
[div id="DivDDFfrom"]
[LABEL style="FONT-SIZE: 9pt"]From:[/LABEL]
[/div]
[/TD]
[td width="190"]
[div id="DivDDF"]
[div id="RaddatepickerDDF_wrapper" style="display:inline;"]
[input name="RaddatepickerDDF" id="RaddatepickerDDF" type="hidden" value="2005-01-01" /]
[span id="RaddatepickerDDF_dateInput_wrapper"]
[input type="hidden" name="RaddatepickerDDF:dateInput" value="2005-1-1 0:0:0" id="RaddatepickerDDF_dateInput" /]
[input id="RaddatepickerDDF_dateInput_TextBox" name="RaddatepickerDDF:dateInput_TextBox" type="text" value="01/01/2005" style="width:100px;float: left" /]
[script type="text/javascript"]window["RaddatepickerDDF_dateInput"] = new RadDateInput("RaddatepickerDDF_dateInput", "");window["RaddatepickerDDF_dateInput"].PromptChar=" ";window["RaddatepickerDDF_dateInput"].DisplayPromptChar="_";
window["RaddatepickerDDF_dateInput"].SetMask(rdmskr(1, 12, false, true),rdmskl('/'),rdmskr(1, 31, false, true),rdmskl('/'),rdmskr(1, 9999, false, true));
window["RaddatepickerDDF_dateInput"].SetValue(window["RaddatepickerDDF_dateInput"].field.value);
window["RaddatepickerDDF_dateInput"].HideOnBlur=true;window["RaddatepickerDDF_dateInput"].AutoPostBack=true;
window["RaddatepickerDDF_dateInput"].AutoPostBackCode="__doPostBack('RaddatepickerDDF$dateInput','')";
window["RaddatepickerDDF_dateInput"].EmptyMessage=" ";window["RaddatepickerDDF_dateInput"].AllowEmpty=true;
window["RaddatepickerDDF_dateInput"].SetMinDate('01/01/2005 00:00');
window["RaddatepickerDDF_dateInput"].SetMaxDate('02/28/2007 00:00');
window["RaddatepickerDDF_dateInput"].InitializePartTypes([[], [4], [0], [2], [], [], [], [], [], []],[]);window["RaddatepickerDDF_dateInput"].Initialize();
[/script]
[/span]

[a onclick="return window['RaddatepickerDDF'].TogglePopup();" onkeypress="return window['RaddatepickerDDF'].TogglePopup();" title="Open the calendar popup." href="#" id="RaddatepickerDDF_popupButton" style="vertical-align:bottom;"]
[img id="RaddatepickerDDF_popupImage" onmouseover="this.src = '/TCN7/RadControls/Calendar/Skins/Outlook/Img/datePickerPopupHover.gif'" onmouseout="this.src = '/TCN7/RadControls/Calendar/Skins/Outlook/Img/datePickerPopup.gif'" onfocus="this.src = '/TCN7/RadControls/Calendar/Skins/Outlook/Img/datePickerPopupHover.gif'" onblur="this.src = '/TCN7/RadControls/Calendar/Skins/Outlook/Img/datePickerPopup.gif'" src="/TCN7/RadControls/Calendar/Skins/Outlook/Img/datePickerPopup.gif" alt="Open the calendar popup." style="border-width:0px;margin-top:3px;" /][/a]
[div id="RaddatepickerDDF_calendar_wrapper" style="display: none" ]
[span id="RaddatepickerDDF_calendarStyleSheetHolder" style="display:none"]
[/span]

[script type="text/javascript"]RadCalendarNamespace.RadCalendarAppendStyleSheet('RaddatepickerDDF_calendar', '/TCN7/RadControls/Calendar/Skins/Default/Calendar.css');
[/script]

[table id="RaddatepickerDDF_calendar" cellpadding="0" cellspacing="0" summary="r.a.d.calendar instance" border="0" class="calendarWrapper"]
[tr]
[td colspan="3" style="vertical-align:top;white-space:nowrap;"]
[table cellpadding="3" cellspacing="0" border="0" class="titlebar" summary="r.a.d.calendar title and navigation controls"]
[tr]
[td]
[a id="RaddatepickerDDF_calendar_FNP" title="[[" href="javascript:void(0);"]
[img src="/TCN7/RadControls/Calendar/Skins/Default/Img/fastNavLeft.gif" alt="[[" style="border:0px;" /]
[/a]
[/td]
[td]
[a id="RaddatepickerDDF_calendar_NP" title="[" href="javascript:void(0);"]
[img src="/TCN7/RadControls/Calendar/Skins/Default/Img/arrowLeft.gif" alt="[" style="border:0px;" /]
[/a]
[/td]
[td id="RaddatepickerDDF_calendar_Title" style="width:100%;text-align:center;white-space:nowrap;cursor:pointer;"]October 2006[/td]
[td]
[a id="RaddatepickerDDF_calendar_NN" title="]" href="javascript:void(0);"]
[img src="/TCN7/RadControls/Calendar/Skins/Default/Img/arrowRight.gif" alt="]" style="border:0px;" /]
[/a]
[/td]

[td]
[a id="RaddatepickerDDF_calendar_FNN" title="]]" href="javascript:void(0);"]
[img src="/TCN7/RadControls/Calendar/Skins/Default/Img/fastNavRight.gif" alt="]]" style="border:0px;" /]
[/a]
[/td]
[/tr]
[/table]
[/td]
[/tr]

[tr]
[td style="height:100%;" colspan="3"]
[table id="RaddatepickerDDF_calendar_Top" class="TableLayout" cellspacing="0" cellpadding="0" summary="October 2006" border="0" style="border-collapse:collapse;"]
[tr]
[td class="DaysOfWeek"]
[/td]
[td id="RaddatepickerDDF_calendar_Top_cs_1" title="Sunday" class="DaysOfWeek" abbr="abbrText" scope="col"]Sun[/td]
[td id="RaddatepickerDDF_calendar_Top_cs_2" title="Monday" class="DaysOfWeek" abbr="abbrText" scope="col"]Mon[/td]
[td id="RaddatepickerDDF_calendar_Top_cs_3" title="Tuesday" class="DaysOfWeek" abbr="abbrText" scope="col"]Tue[/td]
[td id="RaddatepickerDDF_calendar_Top_cs_4" title="Wednesday" class="DaysOfWeek" abbr="abbrText" scope="col"]Wed[/td]
[td id="RaddatepickerDDF_calendar_Top_cs_5" title="Thursday" class="DaysOfWeek" abbr="abbrText" scope="col"]Thu[/td]
[td id="RaddatepickerDDF_calendar_Top_cs_6" title="Friday" class="DaysOfWeek" abbr="abbrText" scope="col"]Fri[/td]
[td id="RaddatepickerDDF_calendar_Top_cs_7" title="Saturday" class="DaysOfWeek" abbr="abbrText" scope="col"]Sat[/td]
[/tr]

[tr]
[td id="RaddatepickerDDF_calendar_Top_rs_1" class="DaysOfWeek"]39[/td]
[td class="otherMonth" title="Sunday, September 24, 2006"]24[/td]
[td class="otherMonth" title="Monday, September 25, 2006"]25[/td]
[td class="otherMonth" title="Tuesday, September 26, 2006"]26[/td]
[td class="otherMonth" title="Wednesday, September 27, 2006"]27[/td]
[td class="otherMonth" title="Thursday, September 28, 2006"]28[/td]
[td class="otherMonth" title="Friday, September 29, 2006"]29[/td]
[td class="otherMonth" title="Saturday, September 30, 2006"]30[/td]
[/tr]

[tr]
[td id="RaddatepickerDDF_calendar_Top_rs_2" class="DaysOfWeek"]40[/td]
[td id="RaddatepickerDDF_calendar_2006_10_1" class="radCalWeekendDefault" title="Sunday, October 01, 2006"]
[a href="javascript:void(0);" ]1[/a]
[/td]
[td id="RaddatepickerDDF_calendar_2006_10_2" class="radCalDefault" title="Monday, October 02, 2006"][a href="javascript:void(0);" ]2[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_3" class="radCalDefault" title="Tuesday, October 03, 2006"][a href="javascript:void(0);" ]3[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_4" class="radCalDefault" title="Wednesday, October 04, 2006"][a href="javascript:void(0);" ]4[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_5" class="radCalDefault" title="Thursday, October 05, 2006"][a href="javascript:void(0);" ]5[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_6" class="radCalDefault" title="Friday, October 06, 2006"][a href="javascript:void(0);" ]6[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_7" class="radCalWeekendDefault" title="Saturday, October 07, 2006"][a href="javascript:void(0);" ]7[/a][/td]
[/tr]

[tr]
[td id="RaddatepickerDDF_calendar_Top_rs_3" class="DaysOfWeek"]41[/td]
[td id="RaddatepickerDDF_calendar_2006_10_8" class="radCalWeekendDefault" title="Sunday, October 08, 2006"][a href="javascript:void(0);" ]8[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_9" class="radCalDefault" title="Monday, October 09, 2006"][a href="javascript:void(0);" ]9[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_10" class="radCalDefault" title="Tuesday, October 10, 2006"][a href="javascript:void(0);" ]10[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_11" class="radCalDefault" title="Wednesday, October 11, 2006"][a href="javascript:void(0);" ]11[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_12" class="radCalDefault" title="Thursday, October 12, 2006"][a href="javascript:void(0);" ]12[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_13" class="radCalDefault" title="Friday, October 13, 2006"][a href="javascript:void(0);" ]13[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_14" class="radCalWeekendDefault" title="Saturday, October 14, 2006"][a href="javascript:void(0);" ]14[/a][/td]
[/tr]

[tr]
[td id="RaddatepickerDDF_calendar_Top_rs_4" class="DaysOfWeek"]42[/td]
[td id="RaddatepickerDDF_calendar_2006_10_15" class="radCalWeekendDefault" title="Sunday, October 15, 2006"][a href="javascript:void(0);" ]15[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_16" class="radCalDefault" title="Monday, October 16, 2006"][a href="javascript:void(0);" ]16[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_17" class="radCalDefault" title="Tuesday, October 17, 2006"][a href="javascript:void(0);" ]17[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_18" class="radCalDefault" title="Wednesday, October 18, 2006"][a href="javascript:void(0);" ]18[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_19" class="radCalDefault" title="Thursday, October 19, 2006"][a href="javascript:void(0);" ]19[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_20" class="radCalDefault" title="Friday, October 20, 2006"][a href="javascript:void(0);" ]20[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_21" class="radCalWeekendDefault" title="Saturday, October 21, 2006"][a href="javascript:void(0);" ]21[/a][/td]
[/tr]

[tr]
[td id="RaddatepickerDDF_calendar_Top_rs_5" class="DaysOfWeek"]43[/td]
[td id="RaddatepickerDDF_calendar_2006_10_22" class="radCalWeekendDefault" title="Sunday, October 22, 2006"][a href="javascript:void(0);" ]22[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_23" class="radCalDefault" title="Monday, October 23, 2006"][a href="javascript:void(0);" ]23[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_24" class="radCalDefault" title="Tuesday, October 24, 2006"][a href="javascript:void(0);" ]24[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_25" class="radCalDefault" title="Wednesday, October 25, 2006"][a href="javascript:void(0);" ]25[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_26" class="radCalDefault" title="Thursday, October 26, 2006"][a href="javascript:void(0);" ]26[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_27" class="radCalDefault" title="Friday, October 27, 2006"][a href="javascript:void(0);" ]27[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_28" class="radCalWeekendDefault" title="Saturday, October 28, 2006"][a href="javascript:void(0);" ]28[/a][/td]
[/tr]

[tr]
[td id="RaddatepickerDDF_calendar_Top_rs_6" class="DaysOfWeek"]44[/td]
[td id="RaddatepickerDDF_calendar_2006_10_29" class="radCalWeekendDefault" title="Sunday, October 29, 2006"][a href="javascript:void(0);" ]29[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_30" class="radCalDefault" title="Monday, October 30, 2006"][a href="javascript:void(0);" ]30[/a][/td]
[td id="RaddatepickerDDF_calendar_2006_10_31" class="radCalDefault" title="Tuesday, October 31, 2006"][a href="javascript:void(0);" ]31[/a][/td]
[td class="otherMonth" title="Wednesday, November 01, 2006"]1[/td]
[td class="otherMonth" title="Thursday, November 02, 2006"]2[/td]
[td class="otherMonth" title="Friday, November 03, 2006"]3[/td]
[td class="otherMonth" title="Saturday, November 04, 2006"]4[/td]
[/tr]
[/table]


============================================================================

The id="RaddatepickerDDF" is what I named it.
lincoln

"Chicago to my mind was the only place to be. ... I above all liked the city because it was filled with people all a-bustle, and the clatter of hooves and carriages, and with delivery wagons and drays and peddlers and the boom and clank of freight trains. And when those black clouds came sailing in from the west, pouring thunderstorms upon us so that you couldn't hear the cries or curses of humankind, I liked that best of all. Chicago could stand up to the worst God had to offer. I understood why it was built--a place for trade, of course, with railroads and ships and so on, but mostly to give all of us a magnitude of defiance that is not provided by one house on the plains. And the plains is where those storms come from." -- E.L. Doctorow


Never apply a Star Trek solution to a Babylon 5 problem.


I am not merely a "consumer" or a "taxpayer". I am a Citizen of the United States.


[link|mailto:bconnors@ev1.net|contact me]
New Should be able to do it by hand
Based on that, I would guess that the example code altmann mentions below fails because they have the wrong name/ID on the popup button. When you run their code is it generating some Javascript error?

Try directly disabling RaddatepickerDDF_dateInput_TextBox and RaddatepickerDDF_popupButton and see if it returns an error.

Jay
New The original javascript...
...was trying to disable:
   <input name="RaddatepickerDDF" id="RaddatepickerDDF" type="hidden" value="2005-01-01" />\n\n   document.getElementById("RaddatepickerDDF").Enabled=false
Which tries to disable a hidden field - not a particularly effective opertation on hidden fields. If you can find the actual input fields that you want to disable, you could theoretically disable those inputs. But the name given to the aspx server control is used to hold the value in a hidden field, which is why your original code doesn't accomplish what you want to accomplish.

Of course, it would be nicer if you could disable the server control - as opposed to handling over on the client. But since that's what your original problem was, you get back to square one.



New Would a hearty RTFM be impolite?
Assuming this is the control you are using. If not I apologize.

[link|http://www.telerik.com/help/radcalendar/v1_NET2/cldClientSideAPI.html|http://www.telerik.c...lientSideAPI.html]

Enable/Disable RadDatePicker Client-Side
To enable/disable DatePicker client-side, its DateInput.Enable() and DateInput.Disable() fucntions should be called. Here is a complete example:



[script type="text/javascript"]

function disable()
{
var datepicker = [%= RadDatePicker1.ClientID %];
datepicker.DateInput.Disable();
datepicker.PopupButton.onclick = null;
}

function enable()
{
var datepicker = [%= RadDatePicker1.ClientID %];
datepicker.DateInput.Enable();
datepicker.PopupButton.onclick = function()
{
datepicker.TogglePopup();
return false;
};
}
[/script]

[radCln:RadDatePicker ID="RadDatePicker1" runat="server" ][/radCln:RadDatePicker]

[a href="javascript:disable();"]Disable[/a]
[a href="javascript:enable();"]Enable[/a]


This may also be of use:

[link|http://msdn2.microsoft.com/en-us/library/3hc29e2a.aspx|http://msdn2.microso...ary/3hc29e2a.aspx]

--
Chris Altmann
New Yes
because I already have. I have tried the code that you have Copied and Pasted from their web site.

It doesn't work.

I have opened up a trouble ticket with them, and so far they admit that setting the control's Disable property doesn't prevent the user from clicking on the Popup button, having the calendar displayed, allowing the user to traverse through the calendar, and selecting a date which gets displayed in the DatePicker's "display". THAT is the action that SHOULD be disabled, but ISN'T.

All I can do is make the control invisible, which leaves a large empty space on the page, which makes my company's president not happy.
lincoln

"Chicago to my mind was the only place to be. ... I above all liked the city because it was filled with people all a-bustle, and the clatter of hooves and carriages, and with delivery wagons and drays and peddlers and the boom and clank of freight trains. And when those black clouds came sailing in from the west, pouring thunderstorms upon us so that you couldn't hear the cries or curses of humankind, I liked that best of all. Chicago could stand up to the worst God had to offer. I understood why it was built--a place for trade, of course, with railroads and ships and so on, but mostly to give all of us a magnitude of defiance that is not provided by one house on the plains. And the plains is where those storms come from." -- E.L. Doctorow


Never apply a Star Trek solution to a Babylon 5 problem.


I am not merely a "consumer" or a "taxpayer". I am a Citizen of the United States.


[link|mailto:bconnors@ev1.net|contact me]
New Works For Me
I grabbed the trial off their site and tried it using .Net 1.1 (VS 2003). It doesn't visually change the PopupButton but it removes the onclick handler of the hyperlink so it won't do anything when clicked. I bet you could add code in these functions to swap in a disabled button image or something.

Note that this code is manipulating two (actually more) different client side html controls/objects generated by the server side calendar controls.

DateInput is a hidden html input control that they appear to use behind the scenes and pass any changes (like calling Disable) via JS onto the separate visible input control.

PopupButton is a hyperlink that pops up the calendar when clicked. This code removes and reattaches the onlclick event handler to enable/disable that.

Yes, it would be nice if it did all this for you with one call to the object represented by the main ClientID (also a hidden html input control BTW), but it doesn't.
--
Chris Altmann
     Disabling 3rd party controls - (lincoln) - (15)
         2 hack solutions - (JayMehaffey) - (3)
             No hidden properties - (lincoln) - (2)
                 Your VP has the right idea. - (static) - (1)
                     We definitely purchased the controls - (lincoln)
         aspx control != html "control" - (altmann) - (10)
             here's the html for the control - (lincoln) - (9)
                 That's not the html... - (ChrisR) - (5)
                     Forgive me - (lincoln) - (1)
                         Problem was that the code you wrote to disable... - (ChrisR)
                     This is... - (lincoln) - (2)
                         Should be able to do it by hand - (JayMehaffey)
                         The original javascript... - (ChrisR)
                 Would a hearty RTFM be impolite? - (altmann) - (2)
                     Yes - (lincoln) - (1)
                         Works For Me - (altmann)

Little fluffy clouds.
130 ms