사람이 오류로 날 halpe 수 :자바 스크립트 잡히지 않는 유형 오류?
Uncaught TypeError: Cannot read
property 'length' of undefined
당신이 아래의 가격을 변경해야 콤보의 값을 변경할 수 있지만,이
function update_price_select2(o, element_name)
{
var sel_obj = null;
var element = null;
//price_original = <?php //echo substr($products_price,0,-1); ?>;
//alert("Preço Original:" + price_original);
if (document.getElementById) // DOM3 = IE5, NS6
{
sel_obj = document.getElementById(o);
//alert("sel_obj "+ sel_obj);
element = document.getElementById(element_name);
//alert("element "+ element);
}
//alert(o);
//alert(element_name);
var index = sel_obj.selectedIndex;
//alert(o+" index");
var price_array = option_price[sel_obj.id];
var price = price_array[index];
var price_for_operation = price.substr(0,price.length -1); //the price from the option choosen
if (price_for_operation == '')
{
price_for_operation = 0;
}
//Ao preço original, vamos retirar o preço da variável que este tinha anteriormente.
current_product_price = current_product_price - option_price[sel_obj.id + '_current'];
//Vamos colocar o valor actual da variável seleccionada
option_price[sel_obj.id + '_current'] = price_for_operation;
if (price_for_operation != 0)
{
var final_price = roundNumber(parseFloat(current_product_price) + parseFloat(price_for_operation),2);
final_price = final_price.toFixed(2);
}
else
{
var final_price = current_product_price.toFixed(2);
}
//Nos save the decimal value, without the € or $, so we can use it in the next options call
current_product_price = final_price;
final_price = final_price + money_simbol;
if (final_price != "")
{
display_updated_price(final_price, element);
update_allowbuy(final_price);
}
}
는 –
@Sachin Shanbhag 안녕하세요 –
업데이트 몇 가지 예제 코드를 필요 895 행의 "order is null"입니다. 메시지가 정확히 어디에서 발화됩니까? – reporter