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

getting Error on combobox postback: Permission denied to get property HTMLDivElement.nodeType

0 Answers 63 Views
AJAX and Web 2.0
This is a migrated thread and some comments may be shown as answers.
pratik
Top achievements
Rank 1
pratik asked on 10 Jul 2009, 01:42 PM
Here is my page code..

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="MasterContentPlaceHolder">   
    <telerik:RadAjaxManagerProxy ID="ajaxProxyContracts" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="tsContractCapture">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="tsContractCapture" />
                    <telerik:AjaxUpdatedControl ControlID="mpContractCapture" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <telerik:RadTabStrip ID="tsContractCapture" runat="server" MultiPageID="mpContractCapture">
        <Tabs>
            <telerik:RadTab runat="server" Text="General" Selected="true" PageViewID="pvGeneral">
            </telerik:RadTab>           
        </Tabs>
    </telerik:RadTabStrip>
    <asp:HiddenField ID="hdnContractID" runat="server" Value="-1" />
    <telerik:RadMultiPage ID="mpContractCapture" runat="server" Width="100%">
        <telerik:RadPageView BorderColor="Gray" Selected="true" BorderStyle="Solid" BorderWidth="1" ID="pvGeneral"
            runat="server">
            <Control:General ID="ucGeneral" runat="server" />
        </telerik:RadPageView>
      
    </telerik:RadMultiPage>
</asp:Content>


Here is my UserControl Code:


<script type="text/javascript">
    function validateCombo(source, args) {
        args.IsValid = false;
        var combo = $find('<%= cmbCounterparty.ClientID %>');
        var text = combo.get_text();
        if (text.length < 1) {
            args.IsValid = false;
        }
        else {
            var node = combo.findItemByText(text);
            if (node) {
                var value = node.get_value();
                if (value.length > 0 && value != -1) {
                    args.IsValid = true;
                }
            }
            else {
                args.IsValid = false;
            }
        }
    }
</script>

<table width="100%" border="0" cellpadding="0" cellspacing="3">
    <tr>
        <td align="right">
            Title
        </td>
        <td width="80%">
            <telerik:RadTextBox  ValidationGroup="Contract" CausesValidation="false" ID="txtTitle"
                runat="server" Width="500px">
            </telerik:RadTextBox>
            <asp:RequiredFieldValidator ID="reqVal_FirstName" runat="server" ControlToValidate="txtTitle"
                ValidationGroup="Contract">
                <asp:Image runat="server" ID="imgError1" AlternateText="*" CssClass="error_text"
                    ImageUrl="~/images/Delete16.png" />
            </asp:RequiredFieldValidator>
        </td>
    </tr>   
    <tr>
        <td align="right">
            Contract Type
        </td>
        <td width="80%">
            <telerik:RadComboBox CausesValidation="false" OnSelectedIndexChanged="cmbContractType_SelectedIndexChanged"
                ID="cmbContractType" AutoPostBack="true" runat="server" Width="250px">
                <CollapseAnimation Duration="200" Type="OutQuint" />
            </telerik:RadComboBox>
            &nbsp;
            <asp:RequiredFieldValidator Display="Dynamic" InitialValue="Select Contract Type"
                ID="reqVal_ContractType" runat="server" ControlToValidate="cmbContractType" ValidationGroup="Contract">
                <asp:Image runat="server" ID="Image2" AlternateText="*" CssClass="error_text" ImageUrl="~/images/Delete16.png" />
            </asp:RequiredFieldValidator>
        </td>
    </tr>

<tr>
        <td align="right">
            Counterparty
        </td>
        <td width="80%">
            <telerik:RadComboBox CausesValidation="false" ID="cmbCounterparty" runat="server"
                Width="250px">
                <CollapseAnimation Duration="200" Type="OutQuint" />
            </telerik:RadComboBox>
            &nbsp;
            <asp:CustomValidator ValidationGroup="Contract" ID="CustomValidator1" runat="server"
                ClientValidationFunction="validateCombo" ControlToValidate="cmbCounterparty"
                ErrorMessage="*" OnServerValidate="CustomValidator1_ServerValidate">
                <asp:Image runat="server" ID="Image4" AlternateText="*" CssClass="error_text" ImageUrl="~/images/Delete16.png" />
            </asp:CustomValidator>
        </td>
    </tr>
</table>

Please suggest

No answers yet. Maybe you can help?

Tags
AJAX and Web 2.0
Asked by
pratik
Top achievements
Rank 1
Share this question
or