aakici
Posts: 49
|
| Posted: 05/24/2005, 4:07 PM |
|
I use one record form and an editable grid. Some fields on editable grid must have same value of fields on record form. I use this code to achieve my purpose.
//***************************************
var Element_Number = this.name.substring(11)-1;
var Element_ID = order_itemsElements[Element_Number][order_itemsproduct_idID].value;
if (parseInt(Element_ID) > 0) {
order_itemsElements[Element_Number][order_itemspriceID].value = product_price[parseInt(Element_ID)];
} else {
order_itemsElements[Element_Number][order_itemspriceID].value = 0;
}
//*************************************
this code is at the on change event of a textbox . this textbox contains text values. but nothing changes when contains integer values. (i change data type property as well)
this code is working on one page, and not working on another new page. what is my mistake?
Explorer shows error " order_itemsElements[....] null or not an object.
_________________
Regards,
M.Alpaslan AKICI |
 |
 |
Nicole
Posts: 586
|
| Posted: 05/25/2005, 4:50 AM |
|
Make sure that you’re using valid form and field names everywhere in your code on "another new page"
_________________
Regards,
Nicole |
 |
 |
aakici
Posts: 49
|
| Posted: 05/27/2005, 4:25 AM |
|
Form is valid and field names are true. I adapted this code from one of CCS examples. If i do not change basic structure and code everything is ok. When i change fields and form i make necessary modifications to code. "order_itemsElements[Element_Number][order_itemsproduct_idID].value" order_items is name of editable grid. order_itemsproduct_idID is field that when content is changed then this function executes. I change order_items as serino because serino is the name of my editable grid. I change order_itemsproduct_idID as serinoserialnumberID because this is the name of textbox. But explorer gives error that "serinoElements[....] null or not an object". I couldn't understand the error.
_________________
Regards,
M.Alpaslan AKICI |
 |
 |
|