function chg_trans(fom,x,y,z) { fom.trans_way.value = x; fom.trans_fee.value = y; fom.trans_fee_str.value = y; fom.trans_nofee.value = z; } function pdt_mod(fom,x,y) { fom.op.value = "mod"; fom.pdt_id.value = x; fom.buy_num.value = y; fom.action="order_add.php"; fom.target="ifrm"; fom.submit(); } function pdt_del(fom,x) { fom.op.value = "del"; fom.pdt_id.value = x; fom.action="order_add.php"; fom.target="ifrm"; fom.submit(); } function total_price(fom) { var total_price = 0; fom.order_total.value = total_price; /* 免運費設定 if(total_price >= parseInt(fom.trans_nofee.value) ) { fom.trans_fee_str.value = "免運費"; fom.trans_total.value = total_price; } else { var trans_fee = 0; if(fom.trans_fee.value!="") { trans_fee = parseInt(fom.trans_fee.value); fom.trans_fee_str.value = trans_fee; } fom.trans_total.value = total_price + trans_fee; } */ fom.trans_total.value = total_price ; } function insOrderChk(fom) { fom.trans_way.value= fom.trans_way.value.trim(); fom.trans_fee.value= fom.trans_fee.value.trim(); fom.trans_nofee.value= fom.trans_nofee.value.trim(); fom.order_total.value= fom.order_total.value.trim(); fom.trans_total.value= fom.trans_total.value.trim(); total_price(fom); var chkitem; /* 不須選擇運送方式 chkitem = check_null(fom.trans_fee.value); if( chkitem != "" ) { alert( "請先選擇運送方式!!" ); fom.chktrans[0].focus(); return false; } */ /* 不需檢查運費選項 check_null(fom.trans_way.value) + check_char(fom.trans_way.value) + check_null(fom.trans_fee.value) + check_null(fom.trans_nofee.value) + check_number(fom.trans_fee.value) + check_number(fom.trans_nofee.value) */ chkitem = check_null(fom.order_total.value) + check_null(fom.trans_total.value) + check_number(fom.order_total.value) + check_number(fom.trans_total.value); if( chkitem != "" ) { alert( "訂單有問題,無法送出訂購資料!!" ); return false; } fom.action='module.php'; fom.modname.value='order_rcv'; fom.target="_top"; fom.submit(); }