PlaceHolder.
then I use a js script:
var
attributes_array =
new
Array();
function
SelectedIndexChanged(sender, eventArgs) {
var
item = eventArgs.get_item();
var
dblCofficient = parseFloat(item.get_value());
var
dblActualPrice = document.getElementById(
'lblActualPrice'
).innerHTML;
if
(dblCofficient > 0) {
var
strlblYourPrice = document.getElementById(
'lblYourPrice'
).innerHTML;
var
strlblUsualPrice = document.getElementById(
'lblUsualPrice'
).innerHTML;
document.getElementById(
'lblYourPrice'
).innerHTML = roundNumber(dblActualPrice * (dblCofficient / 100), 2).toFixed(2).toString().replace(
"."
,
","
) +
' Lt.'
;
document.getElementById(
'lblActualPriceDb'
).innerHTML = roundNumber(dblActualPrice * (dblCofficient / 100), 2).toFixed(2);
document.getElementById(
'lblUsualPrice'
).innerHTML = roundNumber(dblActualPrice * 1.25 * (dblCofficient / 100), 2).toFixed(2).toString().replace(
"."
,
","
) +
' Lt.'
;
}
var
AtributeName = sender.get_attributes().getAttribute(
"AtributeName"
);
var
AtributeValue = item.get_text();
var
field = document.getElementById(
'txtAttributes'
).value;
attributes_array[AtributeName] = AtributeValue;
var
str;
for
(
var
key
in
attributes_array) {
if
(attributes_array.hasOwnProperty(key)) {
str +=
" "
+ key +
": "
+ attributes_array[key] +
";"
//существующий формат, или:
}
}
str = str.substr(10);
document.getElementById(
'txtAttributes'
).value = str;
}
The problem is, that when I first time select a value in any of dinamically created combo - the value changes,
but if I then try to change the value to another - it seems, like it changes, but when combo closes it stays with
the value, that was selected first time. I mean, I cannot change selected value.
What is wrong?