Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
535
ig_edit.js
posted

I can't seem to get the igedit_getById to work. Out of the box the function crashes, and when I import it using     <script type="text/javascript" src="ig_edit.js"></script> then all the elements it finds are undefined.

For instance this simple test project, doesn't work.

 

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication4.WebForm1" %>

 

<%@ Register assembly="Infragistics4.Web.v10.3, Version=10.3.20103.1013, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.Web.UI.EditorControls" tagprefix="ig" %>

 

<%@ Register assembly="Infragistics4.Web.v10.3, Version=10.3.20103.1013, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.Web.UI" tagprefix="ig" %>

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title></title>

    <script type="text/javascript" src="ig_edit.js"></script>

<script type="text/javascript">

    function checkVal() {

        var str = '';

        var num = igedit_getById('WebNumericEdit1');

        if (num)

            str += "Numeric value='" + num.getValue() + "'\n";

        var mask = igedit_getById('WebMaskEdit1');

        if (mask)

            str += "Text in maskedit='" + mask.getValue() + "'";

        window.alert(str);

    }

</script>

</head>

<body>

    <form id="form1" runat="server">

 

    <ig:WebMaskEditor runat="server" InputMask="(###)###-####" 

            DataMode="RawText">

    </ig:WebMaskEditor>

    <ig:WebNumericEditor ID="WebNumericEdit1" runat="server">

    </ig:WebNumericEditor>

    <input type="button" value="check values" onclick="checkVal()" />

    <ig:WebScriptManager ID="WebScriptManager1" runat="server">

    </ig:WebScriptManager>

    </form>

</body>

</html>