I get error referenceerror:usd is not defined. CURRDEF=USD, what is suppose to do is user chooses sales center from dropdown and it will change the currency depending on what it is. i would think here is not passing it. not sure what im doing wrong. on firebug it shows.
*******************************************
CURRDEF := get_criteria_rec('PROP_CURR_DEF',dml_p_oracle_user.get_rec(VUSERNAME).global_region).include_list;
HTP.P( '<script>
function makeRequest(){
var v_data_sales ={pvCurrCd:'||CURRDEF||',
pnSalesCenterID: $(this).find("#pnSalesCenterID").val()
};
$.ajax({
url:contr_entry_pkg.select_sales_center,
data:v_data_sales,
async:false,
success: function(vRetVal){
var jsonObj = eval("("+vRetVal+")");
}
});
};');
HTP.P( '</script>');
--------------
HTP.P('<td class="reqlabel1">Currency:</td>');
HTP.P('<td class="tablelabel">');
HTP.P(Get_Currency_Dd(PVNAME=>'pvCurrCd', PVDEFVAL => NULL, PVEVENT=>'class="reqinput1" onblur="makeRequest();" style="width:200px"'));
HTP.P('</td>');
I guess USD
is not a variable. You must correct your script like:
var v_data_sales ={pvCurrCd:'USD' .
Or if you have this variable you must show us more code.