2012-03-14 189 views
1

编辑:这里的的jsfiddle,这表明,它应该工作的页面 - http://jsfiddle.net/KH3bs/3/的jQuery UI选项卡以HTML形式:在Firefox中工作,打破了IE

EDIT2:工作在IE9上兼容模式,不如果它关闭,则工作。

如果我将其他代码放在我的选项卡中,它们在Firefox和IE中都可以很好地工作。然而,我想要的是我的选项卡中的表单,只要我这样做,他们就会在IE中破解(我特别使用IE9)。

这些被称为主文件中的脚本和样式表:

<link href="http://www.stmartin.edu/styles/global.css" rel="stylesheet" type="text/css" /> 
<link href="http://www.stmartin.edu/styles/2col.css" rel="stylesheet" type="text/css" /> 
<link href="http://www.stmartin.edu/library/css/OGrady.css" rel="stylesheet" type="text/css" /> 
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> 
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script> 
<script language="JavaScript" src="http://www.stmartin.edu/scripts/global.js" type="text/javascript"></script> 

这是网页与我的标签&形式:

<%@ Page Language="VB" masterpagefile="_master/content_2_column.master" title="Saint Martin's University" %> <asp:Content id="Content1" runat="server" contentplaceholderid="headerImage"> 
<img alt="" src="images/libBicycle.jpg" width="1130" height="149" /> 

<link rel="stylesheet" href="../social/styles/jquery-ui-1.8.16.custom.css" /> 

       <script> 
       $(function() { 
           $("#tabs").tabs(); 
       }); 
       </script> 

       <style type="text/css"> 

       #tabs { 
                   display:block; 
                   overflow:auto; 

} 

       </style> 

</asp:Content> 


<asp:Content id="Content2" runat="server" contentplaceholderid="pageContent"> 

<h1>O&#39;Grady Library</h1> 

<p style="font-weight=bold;">Quick search</p> 

<div id="tabs" style="width: 103%; font-size: .8em;">   
     <ul> 
      <li style="width: 23%;"><a href="#tabs-1">Books</a></li> 
      <li style="width: 23%;"><a href="#tabs-2">Articles</a></li> 
      <li style="width: 23%;"><a href="#tabs-3">DVDs</a></li> 
      <li style="width: 23%;"><a href="#tabs-4">Everything</a></li> 
     </ul>  

     <div id="tabs-0"> 
      <form class="search" action="http://stmartin.worldcat.org/search" method="get"> 
      </form> 
     </div> 


     <div id="tabs-1"> 
      <h2>Search the Library Catalog for Books</h2> 
     <form class="search" action="http://stmartin.worldcat.org/search" method="get"> 
      <input type="hidden" name="fq" value="x0:book"> 
      <input type="text" maxlength="65" size="30" name="q"> 
      <input type="submit" value="GO"> 
      </form> 
     </div> 

     <div id="tabs-2"> 
      <h2>Search the Library Catalog for Articles</h2> 
      <form class="search" action="http://stmartin.worldcat.org/search" method="get"> 
      <input type="hidden" name="fq" value="x0:artchap"> 
      <input type="text" maxlength="65" size="30" name="q"> 
      <input type="submit" value="GO"> 
     </form> 
     </div> 

     <div id="tabs-3"> 
      <h2>Search the Library Catalog for DVDs</h2> 
      <form class="search" action="http://stmartin.worldcat.org/search" method="get"> 
      <input type="hidden" name="fq" value="x0:video"> 
      <input type="text" maxlength="65" size="30" name="q"> 
      <input type="submit" value="GO"> 
     </form> 
     </div> 

     <div id="tabs-4"> 
      <h2>Search the Library Catalog for Everything</h2> 
      <form class="search" action="http://stmartin.worldcat.org/search" method="get"> 
      <input type="text" maxlength="65" size="30" name="q"> 
      <input type="submit" value="GO"> 
     </form> 

     </div> 
     </div> 



</asp:Content> 

<asp:Content id="Content3" runat="server" contentplaceholderid="rightContent"> 

<h1>Library hours Spring 2012</h1> 

<table cellspacing="0"> 
<tr> 
<td>Mon-Thu </td> 
<td align="right">7:30 am</td> 
<td align="center">-</td> 
<td align="right">11 pm</td></tr> 
<tr> 
<td>Fri</td> 
<td align="right">7:30 am</td> 
<td align="center">-</td> 
<td align="right">5 pm</td></tr> 
<tr> 
<td>Sat</td> 
<td align="right">10 am</td> 
<td align="center">-</td> 
<td align="right">6 pm</td></tr> 
<tr> 
<td>Sun</td> 
<td align="right">1 pm</td> 
<td align="center">-</td> 
<td align="right">9 pm</td></tr> 
</table> 


<p>&nbsp;<br /> 
<a href="about/hours.aspx">See details</a> for holidays<br /> 
<a href="../about/ClosurePolicy.aspx">Campus closure policy</a></p> 
<p><a href="jobs/"><strong>Employment opportunities</strong></a></p> 


<p> 
<a href="guides/bridge.aspx"> Personal Librarian</a> program</p> 

</asp:Content> 

有在标签空白表单因为Firefox拒绝提交首先列出的任何表单(出于某种原因),所以这是一个马虎的修复。无论哪种方式,它在IE中不起作用。

Firefox看起来应该完全一样。但是,在IE9中,我无法在选项卡之间切换,并且所有表单最终都会一次性垂直列出页面。这些表单在IE中可以工作,但显然把它们放在jQuery选项卡后面的目的是让它们不会同时显示。

IE8工作得更好 - 它将在选项卡之间切换,并只列出活动选项卡的表单,但会将表单向下颠倒到页面的一半。 IE的两个版本都有一些明显的问题,并且也在左边的边栏中将内容往下压。

如果我将选项卡中的内容更改为任何不是那么那么选项卡将在IE中工作。我们在另一个页面上有相同的标签(http://www.stmartin.edu/social/),它们都很好,所以无论出于何种原因,它绝对是不想玩的好地方。

任何帮助或建议,非常感谢。谢谢!

回答

0

尝试关闭输入标签

<input type="text" maxlength="65" size="30" name="q" /> 

所有输入标签是开放的。不知道这是否是问题,但尝试一下 - 可能会设置一个jsfiddle。

+0

谢谢!我关闭了输入标签,但它没有帮助。我建立了一个jsFiddle,它显示页面正常工作: http://jsfiddle.net/KH3bs/3/ – 2012-03-14 17:37:01

0

由于兼容性模式在IE9工作,我不得不IE7仿真与meta标签:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> 

它的工作原理,但它不是一个超级的解决方案。其他建议仍然受欢迎。

相关问题