2016-07-07 175 views
1

enter image description here未捕獲引用錯誤

當我點擊藍色的「添加行」按鈕」錯誤apears。任何試圖解決此問題的幫助?

jQuery是工具和腳本之前加載

if($.isEmptyObject(num)) // check if any row already exist if not set 1 
    num = 1; 
else // check if any row already exist if yes set max + 1 
    num = Math.max.apply(Math,num) + 1; 

html += '<div id="megamenu-row-'+num+'" class="megamenu-row row">'; 
    html += '<div class="clearfix">'; 
     html += '<div class="add-column-button-container col-lg-6">'; 
      html += '<a href="#" onclick="return false;" class="btn btn-success add-megamenu-col">'+add_megamenu_column+'</a>'; 
     html += '</div>'; 
     html += '<div class="remove-row-button col-lg-6 text-right">'; 
      html += '<a class="btn btn-danger btn-remove-row" href="#" onclick="return false;">'+btn_remove_row_text+'</a>'; 
     html += '</div">'; 
    html += '</div>'; 
    html += '<input type="hidden" name="row_content" />'; 
html += '</div>'; 

return html;  

}

:頁面被在該代碼的第9行加載

發生

錯誤之後運行

+2

我們無法幫助您瞭解這些信息。正因爲如此,這個問題應該關閉。請添加一些代碼。 –

+0

我添加了問題發生的代碼 – user3241620

+1

add_megamenu_column變量沒有被定義,你應該聲明它, –

回答

0

您可能會在其名稱中輸入錯誤的\r\n的某些產品/類別,這會產生back.js。在/modules/tmmegamenu/views/templates/admin/additem.tpl

{addJsDef option_list=$option_select|replace:"\r":""|replace:"\n":""}

這應該更換工作在路223

{addJsDef option_list=$option_select}