Welcome Guest Search | Active Topics | Sign In | Register

MaskedEdit OnBlur Options
Jamie Miller
Posted: Monday, August 17, 2009 6:57:04 AM
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.
eo_support
Posted: Monday, August 17, 2009 7:28:13 AM
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!
Jamie Miller
Posted: Monday, August 17, 2009 8:29:02 AM
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?
Jamie Miller
Posted: Monday, August 17, 2009 8:51:29 AM
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('','').
eo_support
Posted: Monday, August 17, 2009 9:16:30 AM
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!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.