2012-01-04 19 views
0

こんにちは私はこのスクリプトの最後の行でdreamweaverでエラーが発生しているようですが、頭にJqueryの初期化コードを追加してから登場しましたが、エラーは実際にはDreamweaverによると、終了スクリプトタグはエラーです。それは予約語であるため、あなたは引用符なしで単語クラスを使用することはできませんJqueryの構文エラーですが、強調表示されていません

<script src="./ui/media/js/jquery-1.6.2.min.js" type="text/javascript"></script> 
<script src="./ui/media/js/jquery.dataTables.min.js"  type="text/javascript"></script> 

<script src="./ui/media/js/ZeroClipboard.js" type="text/javascript"></script> 

<script src="./ui/media/js/TableTools.js" type="text/javascript"></script> 

<!-- TinyMCE --> 
<script type="text/javascript" src="./jscripts/tiny_mce/tiny_mce.js"></script> 
<script type="text/javascript"> 
tinyMCE.init({ 
    mode : "textareas", 
    theme : "simple", 
    editor_selector : "mceSimple" 
}); 

tinyMCE.init({ 
    mode : "textareas", 
    theme : "advanced", 
    editor_selector : "mceAdvanced", 
    theme_advanced_buttons1 :  "bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,undo,redo,link,unlink,Name,Rep,Date", 
    theme_advanced_buttons2 : "", 
    theme_advanced_buttons3 : "", 
    theme_advanced_toolbar_location : "top", 
    theme_advanced_toolbar_align : "left", 
    theme_advanced_statusbar_location : "bottom", 
    plugins : 'inlinepopups', 
    setup : function(ed) { 
     // Add a custom button 
     ed.addButton('Name', { 
      title : '[Name]', 
      class : 'namebutton', 
      image : 'img/example.gif', 
      onclick : function() { 
       // Add you own code to execute something on click 
       ed.focus(); 
       ed.selection.setContent('{name}'); 
      } 

     }); 

     ed.addButton('Rep', { 
      title : '[Rep]', 
      class : 'repbutton', 
      image : 'img/example.gif', 
      onclick : function() { 
       // Add you own code to execute something on click 
       ed.focus(); 
       ed.selection.setContent('{createdby}'); 
      } 
     }); 

     ed.addButton('Date', { 
      title : '[Date]', 
      class : 'datebutton', 
      image : 'img/example.gif', 
      onclick : function() { 
       // Add you own code to execute something on click 
       ed.focus(); 
       ed.selection.setContent('{datesent}'); 
      } 
     }); 
</script> 

<!-- /TinyMCE --> 






<script src="./ui/media/js/jquery-ui-1.8.16.custom.min.js"  type="text/javascript"></script> 



<script type="text/javascript"> 
$(document).ready(function() { 
    $('#dashboard').dataTable({ 
     "bJQueryUI": true, 
     "bInfo": true, 
     "bAutoWidth": true, 
     "bFilter": true, 
     "bLengthChange": true, 
     "bPaginate": true, 
     "bProcessing": true, 
     "bSort": true, 
     "sPaginationType": "full_numbers", 
     "aaSorting": [[ 6, "desc" ]], 
     "iDisplayLength": 5, 
     "bLengthChange": false 
    }); 
}); 
</script> 
+0

コードを正しくインデントしたら、簡単に解決策を見つけられました。 –

答えて

1

あなたはtinyMCE.initを閉じるには、あなたの小さなMCEコードで2つの閉じ括弧が欠落してsetup: function(ed) {されています

<script type="text/javascript"> 
tinyMCE.init({ 
    mode : "textareas", 
    theme : "simple", 
    editor_selector : "mceSimple" 
}); 

tinyMCE.init({ 
    mode : "textareas", 
    theme : "advanced", 
    editor_selector : "mceAdvanced", 
theme_advanced_buttons1 :  "bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright,  justifyfull,bullist,numlist,undo,redo,link,unlink,Name,Rep,Date", 
theme_advanced_buttons2 : "", 
theme_advanced_buttons3 : "", 
theme_advanced_toolbar_location : "top", 
theme_advanced_toolbar_align : "left", 
theme_advanced_statusbar_location : "bottom", 
plugins : 'inlinepopups', 
setup : function(ed) { 
    // Add a custom button 
    ed.addButton('Name', { 
     title : '[Name]', 
     class : 'namebutton', 
     image : 'img/example.gif', 
     onclick : function() { 
      // Add you own code to execute something on click 
      ed.focus(); 
      ed.selection.setContent('{name}'); 
     } 

    }); 
     ed.addButton('Rep', { 
     title : '[Rep]', 
     class : 'repbutton', 
     image : 'img/example.gif', 
     onclick : function() { 
      // Add you own code to execute something on click 
      ed.focus(); 
      ed.selection.setContent('{createdby}'); 
     } 

    }); 
    ed.addButton('Date', { 
     title : '[Date]', 
     class : 'datebutton', 
     image : 'img/example.gif', 
     onclick : function() { 
      // Add you own code to execute something on click 
      ed.focus(); 
      ed.selection.setContent('{datesent}'); 
     } 

    }); 
    } 
}); 
    </script> 

    <!-- /TinyMCE --> 
2

。 また、tinyMCE.initの最後に2つの閉じ括弧と1つの閉じ括弧があります。

+0

私は全部または単語クラスだけを引用する必要があるので、 "class": ? –

+0

クラスのすべてのインスタンスに引用符を追加しましたが、最後の行にエラーがあると表示されます –

+0

クラスのみ。 {'class': 'namebutton'}; 最後の行でエラーが発生するのは、角かっこがないためです。追加}});の前にtinyMCE.initと呼んでいる部分 –

0

あなたのtinymceブロックで数閉じる括弧が欠落していました。これを試してみてください:

tinyMCE.init({ 
    mode : "textareas", 
    theme : "advanced", 
    editor_selector : "mceAdvanced", 
    theme_advanced_buttons1 : "bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,undo,redo,link,unlink,Name,Rep,Date", 
    theme_advanced_buttons2 : "", 
    theme_advanced_buttons3 : "", 
    theme_advanced_toolbar_location : "top", 
    theme_advanced_toolbar_align : "left", 
    theme_advanced_statusbar_location : "bottom", 
    plugins : 'inlinepopups', 
    setup : function(ed) { 
     // Add a custom button 
     ed.addButton('Name', { 
      title : '[Name]', 
      class : 'namebutton', 
      image : 'img/example.gif', 
      onclick : function() { 
       // Add you own code to execute something on click 
       ed.focus(); 
       ed.selection.setContent('{name}'); 
      } 
     }); 

     ed.addButton('Rep', { 
      title : '[Rep]', 
      class : 'repbutton', 
      image : 'img/example.gif', 
      onclick : function() { 
       // Add you own code to execute something on click 
       ed.focus(); 
       ed.selection.setContent('{createdby}'); 
      } 
     }); 

     ed.addButton('Date', { 
      title : '[Date]', 
      class : 'datebutton', 
      image : 'img/example.gif', 
      onclick : function() { 
       // Add you own code to execute something on click 
       ed.focus(); 
       ed.selection.setContent('{datesent}'); 
      } 
     }); 
    } 
}); 
関連する問題