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>
Hi lunaios,
As far as I can see you want to access the WebNumericEditor and WebMaskEditor by their ID.
This can be achieved using:
ig_controls.WebNumericEditor1 ig_controls.WebMaskEditor1
ig_controls.WebNumericEditor1
ig_controls.WebMaskEditor1
Please contact me if you have any questions.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://ko.infragistics.com/support