2012-03-15 10 views
0

私はRailsが初めてです。私はプロジェクトでjQueryとjQGridを使用しています。私が直面している問題は、次の内容がページに表示されているページを読み込むときです。私は理由が分からない。いずれにせよこの問題の理由を教えてもらえますか?スクリプトタグの内容がページに印刷されています

<script src="/javascripts/jqgrid/jquery.js?1331713080" type="text/javascript"></script> 
<script src="/javascripts/jqgrid/jquery-ui-1.7.1.custom.min.js?1331713080" type="text/javascript"></script> 
<script src="/javascripts/jqgrid/jquery.layout.js?1331713080" type="text/javascript"></script> 
<script src="/javascripts/jqgrid/i18n/grid.locale-en.js?1331713080" type="text/javascript"></script> 
<script src="/javascripts/jqgrid/jquery.jqGrid.min.js?1331713080" type="text/javascript"></script> 
<script src="/javascripts/jqgrid/jquery.tablednd.js?1331713080" type="text/javascript"></script> 
<script src="/javascripts/jqgrid/jquery.contextmenu.js?1331713080" type="text/javascript"></script> 

これが私の見解コードで、

<%= stylesheet_link_tag "process_mon/style" %> 
<%= javascript_include_tag "process_mon/conf" %> 
<%= javascript_include_tag "prototype" %> 
<%= javascript_include_tag "process_mon/monitor" %> 
<%= javascript_include_tag "process_mon/validations"%> 
<style> 
     fieldset{ 
       font-family: Times New Roman; 
       font-size: 12; 
     } 
     body { 
       background : #f9f9f3; 
     }   
.tabmenu a, #tabmenu a.active { 
     background: none repeat scroll 0 0 #E6B662; 
     color: #000000; 
     font-size: 12px; 
     font-weight: bold; 
     margin: 0; 
     padding: 3px 8px 1px; 
     text-decoration: none; 
}  
.tabmenu a:link 
{ 
     background: none repeat scroll 0 0 #E6B662; 
     color:#000000; 
     font:bold 14px arial; 
     padding:5px 8px 5px 5px; 
     text-decoration : none; 
} 
.tabmenu a.active 
{ 
     background : none repeat scroll 0 0 #F9F9F3; 
     border-bottom : 3px solid #F9F9F3; 
     color : #000000; 
} 
#navigation ul 
{ 
list-style: none; 
padding: 0; 
margin: 0 
} 
.tabmenu li 
{ 
display: inline; 
list-style-type:none; 
float: left; 
margin: 0; 
margin-left : -41px; 
margin-right: 45px; 
} 
</style> 

<% if params["load"] == "conf" %> 
     <body onLoad="new Ajax.Updater('maindiv', '/processmonitoring/conflist', {asynchronous:true, evalScripts:true});return false;"> 
<% else %> 
     <body onLoad="new Ajax.Updater('maindiv', '/processmonitoring/monitor', {asynchronous:true, evalScripts:true});return false;"> 
<% end %> 
<div id="tabmenu" class="tabmenu" style="position: absolute;width : 100%"> 
<ul id="navigation"> 
         <li><span><%= link_to "Monitor", :update => "maindiv" ,:url => { :controller => 'processmonitoring', :action => 'monitor' }, :complete => 'reset();', :method => 'get' %></span></li> 

         <li><span><%= link_to "Configuration", :update => "maindiv" , :load => "conf" , :url => { :controller => 'processmonitoring', :action => 'conflist' } %><span></li> 

</ul> 
</div> 
<br><br><br> 
<div style="clear:both" ></div> 
<div id="maindiv"> 
</div> 
</body> 
+0

これらのスクリプトを追加する時点でのビューの外観はどうですか?彼らは逐語的にまたはヘルパーから含まれていますか? – Emily

+0

ビューコードを投稿してください。 –

+0

私は私のビューコードを追加しました。 –

答えて

0

私はこのことについてわからないが、あなたはタグの間にあなたの全体のデータを置くことができ、すべてのあなたのスタイルとの間にはJavaScriptタグをつけ、その場合はチェック私はそれがオール知っている

があなたのページ

<!DOCTYPE html> 
<html> 
<head> 
    <title>Web page title</title> 
    <script type="text/javascript" src="script.js"></script> 
</head> 
<body> 
    <!-- HTML code here --> 
</body> 
</html> 
0

ため、このパターンに従うことを確認できますD質問が、それは他の人のためにいくつかの時間を節約することができます:

今日は同じ問題を抱えていたと私は、根本的な原因だったCSSでスタイルを持っていた:

body * { 
    display: inline; // or any display value other than none 
} 

*scriptタグを含んでいます。

関連する問題