This is a migrated thread and some comments may be shown as answers.

Event Handler is undefined

1 Answer 73 Views
Input
This is a migrated thread and some comments may be shown as answers.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 30 Dec 2008, 07:54 PM
Hello,

I have the following markup in a user control:

<tel:RadCodeBlock id="rcbFormScript" runat="server">
<script language="javascript">
    function txtSubject_Blur(sender, e) {
        //Code here
    }
</script>
</tel:RadCodeBlock>

<tel:RadTextBox ...>
    <ClientEvents OnBlur="txtSubject_Blur" />
</tel:RadTextBox>

The user control is not dynamically loaded, but it's not present on page load.  When the UC is present (in response to an RadAjaxManager AJAX update), I get the error txtSubject_Blur is undefined.

Why is that?  How can I correct the problem?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Brian Mains
Top achievements
Rank 1
answered on 30 Dec 2008, 08:21 PM
I figured it out; I needed a RadScriptBlock instead because it was a partial postback.  Once I made that switch, it worked.
Tags
Input
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Brian Mains
Top achievements
Rank 1
Share this question
or