|
Rank: Member Groups: Member
Joined: 2/6/2009 Posts: 26
|
Hi,
I'm trying to set an onblur event on a MaskedEditBox, but the even never fires. Is there some other method I need to use to set an onblur event? I'm currently doing:
mtb.Attributes.Add("onblur","myMethod()");
in the codebehind.
Thanks,
David.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Unfortunately I am not aware of any easy way to catch onblur on a MaskedEdit control. I believe MaskedEdit itself handles onblur so whatever method you attached will be overwritten. You can try use attachEvent to attach your event handler to the textbox on the client side, but you must wait until the MaskedEdit has already been initialized (by checking whether the textbox already have an onblur handler).
Thanks!
|
|
Rank: Member Groups: Member
Joined: 2/6/2009 Posts: 26
|
what about the onchange event? I can't seem to get that to fire either?
|
|
Rank: Member Groups: Member
Joined: 2/6/2009 Posts: 26
|
Also, I was wondering if MaskedEditValidator would help, but it doesn't seem to fire unless I use a asp:Button to submit my form. My form is actually being submitted by __doPostBack('','').
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Neither will work for you. The Validator as you noticed is only fired when the page submits. onchange will not work either. We do not handle onchange directly, but we handle onkeypress, which would somehow mysteriously silence onchange on IE.
The most straight forward solution would probably be for us to add a ClientSideOnChange event handler on the control. That way we can code to make sure it's always correctly fired. In the mean time, I do not see a clean solution for this.
Thanks!
|
|