Js page error

problem description

js page error

the environmental background of the problems and what methods you have tried

this is a new editing page. The springMvc, used to return ModelAndView, did not return data, so it was wrong. I wanted to judge whether it was already false, or there was a problem with the error

.

related codes

< script type= "text/javascript" >

$(function () {

$("-sharpitemTypeId").change(function() {
    var itemTypeId = $(this).val();
    $.doRequest("/present/getGoods.do",{
        "itemType": itemTypeId            
      },function(result) {
          if(result.resultCode == "SUCCESS"){
              var optData = result.model;
              $("-sharpgoodsId").html("");
              var optHtml = "";
              if(optData && optData.length > 0) {
                  for(var index in optData) {
                      var opt = optData[index];
                      var goodsId=0;
                      if(${not empty dbData}){
                          goodsId=${dbData.goodsId};//
                      }
                      if(opt.id==goodsId){
                          optHtml += "<option value=""+ opt.id +"" selected="selected" >"+ opt.name +"</option>";
                      }else{
                          optHtml += "<option value=""+ opt.id +"">"+ opt.name +"</option>";
                      }
                  }
              }else {
                  optHtml = "<option value=""></option>";
              }
              $(optHtml).appendTo($("-sharpgoodsId"));
          } else {
              alert(result.resultMsg);
          }
      });
});

});

what result do you expect? What is the error message actually seen?

clipboard.png

Aug.12,2021

errors are obvious, syntax errors


goodsId=${dbData.goodsId};

I think you are using a tag library similar to EL; syntax error
changed to:

//${dbData.goodsId}
goodsId = '${dbData.goodsId}';

if(${not empty dbData}){
  goodsId=${dbData.goodsId};//
}

can you explain what this ${not empty dbData} and ${dbData.goodsId} mean? I have never seen jquery have this syntax

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c796-2b862.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c796-2b862.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?