user2954871
user2954871

Reputation: 9

error on javascript, probably syntax?

I get error

[Error] PLS-00103 (805: 6): PLS-00103: Encountered the symbol "HTP" when expecting one of the following: := . ( % ;
The symbol ":=" was substituted for "HTP" to continue.

Which is the last line, I don't see anything that I'm missing, but obviously there is a comma or something. Can anyone help?

      HTP.P( '<script> 
 function currencychange(){

     $.ajax({
          url:contr_entry_pkg.select_sales_center,
          data: { pvCurrCd:'||CURRDEF||',
          pnSalesCenterID: $(this).find("#pnSalesCenterID").val()

                }
          async:false,
          success: function(vRetVal){
                 var jsonObj =  eval("("+vRetVal+")");
               }

               });
           };' )   
     HTP.P( '</script>');  

Upvotes: 1

Views: 74

Answers (2)

mquandalle
mquandalle

Reputation: 2598

As you can see with syntax hightlighting...

HTP.P('<script> 
    function currencychange(){
    $.ajax({
      url:contr_entry_pkg.select_sales_center,
      data: { 
        pvCurrCd:"||CURRDEF||",
        pnSalesCenterID: $(this).find("#pnSalesCenterID").val()
      },
      async:false,
      success: function(vRetVal) {
        var jsonObj =  eval("("+vRetVal+")");
      }

    });
};');   

HTP.P('</script>');  

Upvotes: 0

VitaliyG
VitaliyG

Reputation: 1857

Maybe there should be ; before last line

'...
       };' );   
 HTP.P( '</script>');  

Upvotes: 1

Related Questions