I want to write a cliet side script which will add values of two different web numeric edits and insert into a third one. I am able to read the values from the web numeric edit but can't insert the total into the third one. Here is my code:
var x = document.getElementById("<%=wne_cost_of_land.ClientID%>").value; // gets the value
var y = document.getElementById("<%=wne_cost_of_building.ClientID%>").value; // gets the value
var z = Number(x) + Number(y); // total is calculated
document.getElementById("<%=wne_total_cost.ClientID%>").value = z //does nothing
Can anybody please suggest me how to insert the value in the web numeric edit on client side.
Thanks
HI
Setvalue() & get value() method can not find in that.
var edit = document.getElementById("ctl00_ContentPlaceHolder1_txtAfterRate");
I have checked all methods but above methods are not there.
When working with Infragistics controls through JavaScript, you will want to use our Client Side Object Model. Instead of using the standard document.getElementById method, we provide utility functions that can be used to obtain our objects through JavaScript. Once you have our object, you can access that objects specific properties and methods. Using our object model will also ensure that changes are preserved.
Our utility function for our web editors looks something like this:
var editor = igedit_getById("WebDateTimeEdit1");
This editor object will have getValue() and setValue() methods you can use to access the values.
CSOM Documentation:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.1/CLR2.0/html/Web_Client_Side_Object_Model_CSOM_Reference_Guide.html
CSOM Documentation for WebEditors:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.1/CLR2.0/html/WebEditors_CSOM.html