Hi.
I have calendar control.
I have this C# code:
This code is wrong. Method is run, but "this" keyword is not the reference to that anohter control but something else. (I dont know). Running SetDate throws JavaScript error (this.get_element() does not exist).
Client side object of that another control is looking like that:
Yes, I can call special in page function and this throws no error and everything is ok. (Called by
So It seems to me that I must create these in page functions for every method calling when one Ajax control calls the other.
:-(
Thank you for any help.
Tom
I have calendar control.
I have this C# code:
this.dateTimePicker.ClientEvents.OnPopupOpening = "$find('" + anotherControl.ClientID + "').SetDate"; |
This code is wrong. Method is run, but "this" keyword is not the reference to that anohter control but something else. (I dont know). Running SetDate throws JavaScript error (this.get_element() does not exist).
Client side object of that another control is looking like that:
Type.registerNamespace('FluTel'); |
FluTel.DateTimePicker = function(element) |
{ |
this._innerControl = null; |
this.first_name = "adam"; |
this.last_name = "drda"; |
FluTel.DateTimePicker.initializeBase(this, [element]); |
} |
FluTel.DateTimePicker.prototype = { |
initialize : function() |
{ |
FluTel.DateTimePicker.callBaseMethod(this,'initialize'); |
// var element = this.get_element(); |
// Sys.Debug.fail(""); |
}, |
dispose : function() { |
$clearHandlers(this.get_element()); |
FluTel.DateTimePicker.callBaseMethod(this, 'dispose'); |
}, |
SetDate : function() |
{ |
this._innerControl = $find(this.get_element().innerControlId); |
alert("I am here " + this._innerControl); |
} |
} |
FluTel.DateTimePicker.registerClass('FluTel.DateTimePicker', Sys.UI.Control); |
if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded(); |
Yes, I can call special in page function and this throws no error and everything is ok. (Called by
this.dateTimePicker.ClientEvents.OnPopupOpening = "runSetDate"; |
<script> |
function runSetDate() |
{ |
$find('thatObjectId').SetDate(); |
} |
</script> |
So It seems to me that I must create these in page functions for every method calling when one Ajax control calls the other.
:-(
Thank you for any help.
Tom