链接在IE中工作...但不在Firefox和Safari中

时间:2021-09-24 17:39:36

i'm taken over a website and I'm having issues with a template. For some reason most of the hyperlinks on the page won't render in Firefox or Safari but work fine in IE...

我接管了一个网站,我遇到了模板问题。出于某种原因,页面上的大多数超链接都不会在Firefox或Safari中呈现,但在IE中可以正常工作...

This is the page in question: http://www.sstaffs.gov.uk/your_services/leisure_services/leisure_centres/cheslyn_hay_leisure_centre1.aspx

这是有问题的页面:http://www.sstaffs.gov.uk/your_services/leisure_services/leisure_centres/cheslyn_hay_leisure_centre1.aspx

Code for page template is here:

页面模板的代码在这里:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<head runat="server">
<title>South Staffordshire Council - <imm:PageProps type="title" runat="server" id="AutoId1"><%--><--%></imm:PageProps></title>
<!-- Mobile Specific Metas
  ================================================== -->

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">


<immCore:Null><%--><!--<--%></immCore:Null>
<meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1">
<immCore:Null><%-->--><--%></immCore:Null>

<link title="Alternate Page" href="ILINK|0,|" rel="alternate"/>


<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="http://code.jquery.com/jquery.js"></script>

<link href="css/bs/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>

<link href="css/system/southstaffs2013.css" rel="stylesheet" type="text/css"/>

    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="css/bs/js/bootstrap.min.js"></script>

<script type="text/javascript" src="ratingSelector.js"></script>
<link rel="stylesheet" href="css/responsive_stylesheets/skeleton.css">

<link rel="stylesheet" href="css/responsive_stylesheets/stylesheets/layout.css">



<!-- ie8 support -->
<script src="css/bs/js/respond.min.js"></script>

<!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<style>
div.horizontal
{
position:absolute;
left:0;
top:135px;
width:1100px;
height:40px;
}
div.horizontal ul
{
list-style-type:none;
margin:0;
padding:0;
}
div.horizontal li
{
float:left;
}
div.horizontal a
{
display:block;
width:120px;
height:40px;
}
div.horizontal a:link,div.horizontal a:visited
{
font-weight:bold;
color:#FFFFFF;
background-color:#97ca61;
text-align:center;
padding:4px;
text-decoration:none;
text-transform:uppercase;
}
div.horizontal a:hover,div.horizontal a:active
{
background-color:#22772d;
}
</style>

</head>
<body>

<form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server" />

<div class="container" id="content">

<div id="globalnavRS"> 
  <immCore:ListMenu LinksPage="3450" runat="server" id="AutoId4">
  <headertemplate>
  </headertemplate>
  <itemtemplate>
  <a href="<%# Container.Link %>" title="<%# Container.Title %>"><%# Container.Title %></a> 
  </itemtemplate>
  <separatortemplate>
  &nbsp;|&nbsp; 
  </separatortemplate>
  <%-->Global&nbsp;|&nbsp;Menu&nbsp;|&nbsp;Here<--%>
  </immCore:ListMenu>
</div>

<div id="searchbar"> <custom:searchbar runat="server" id="Auto2332Id31"> </custom:searchbar> 

 </div>
<div id="mastheadRS"></div>
<div id="headerr">
 <a href="http://www.sstaffs.gov.uk">
 <img alt="header" src="images/newsite/ssdclogo.gif"/>
</a>
</div>

<div id="ealert"> <a href="https://public.govdelivery.com/accounts/UKSSTAFFS/subscriber/new"><img alt="South Staffordshire e-alerts" src="http://www.sstaffs.gov.uk/images/ealert_box.gif" /></a>
</div> 


<div class="horizontal">
<ul>
<li><a href="ILINK|22332,|">Centre Home</a></li>
<li><a href="ILINK|19817,|">Prices</a></li>
<li><a href="ILINK|13380,|">Swimming</a></li>
<li><a href="ILINK|13376,|">Fitness Suite</a></li>
<li><a href="ILINK|13375,|">Exercise Classes</a></li>
<li><a href="ILINK|13374,|">Dry Sports & Courses</a></li>
<li><a href="ILINK|19505,|">3g Astro Pitch</a></li>
<li><a href="ILINK|13322,|"> </a></li>
</ul>
</div>

<br/>


<imm:area name="main" runat="server" id="AutoId14"> Test Content
<p>Some content will go here and look like this. </p>
</imm:area>   


<immCore:Null><%--><!--<--%></immCore:Null>


<div id="ratethispage">
                                    <span class="text">Rate this page</span>
<br />
<span class="items"><a rel="nofollow,noindex" class="rating_item" href="http://www.sstaffs.gov.uk/Default.aspx?page=17786&amp;PageRate=<% =Immediacy.Web.ImmHttpContext.Current.ContentPage.ID %>&amp;Rating=1"><img src="star_off.gif" alt="Rate this page - 1 / 5" width="18" height="17" border="0" /></a><a rel="nofollow,noindex" class="rating_item" href="http://www.sstaffs.gov.uk/Default.aspx?page=17786&amp;PageRate=<% =Immediacy.Web.ImmHttpContext.Current.ContentPage.ID %>&amp;Rating=2"><img src="star_off.gif" alt="Rate this page - 2 / 5" width="18" height="17" border="0" /></a><a rel="nofollow,noindex" class="rating_item" href="http://www.sstaffs.gov.uk/Default.aspx?page=17786&amp;PageRate=<% =Immediacy.Web.ImmHttpContext.Current.ContentPage.ID %>&amp;Rating=3"><img src="star_off.gif" alt="Rate this page - 3 / 5" width="18" height="17" border="0" /></a><a rel="nofollow,noindex" class="rating_item" href="http://www.sstaffs.gov.uk/Default.aspx?page=17786&amp;PageRate=<% =Immediacy.Web.ImmHttpContext.Current.ContentPage.ID %>&amp;Rating=4"><img src="star_off.gif" alt="Rate this page - 4 / 5" width="18" height="17" border="0" /></a><a rel="nofollow,noindex" class="rating_item" href="http://www.sstaffs.gov.uk/Default.aspx?page=17786&amp;PageRate=<% =Immediacy.Web.ImmHttpContext.Current.ContentPage.ID %>&amp;Rating=5"><img src="star_off.gif" alt="Rate this page - 5 / 5" width="18" height="17" border="0" /></a></span></div>
    <script type="text/javascript"><!--
                                    var rating = new ratingSelector("ratethispage","Rate this page","-1","3.02","386");//-->
                                </script>
<noscript></noscript>

<br />                  

<footer>
<div id="footerRSWide">
<custom:browseservices2013 runat="server" id="Auto27868763"> </custom:browseservices2013>


<div style="text-align: center">

<a href="http://southstaffordshire.thegoodlife.uk.net/"><img src="http://www.sstaffs.gov.uk/images/newsite/goodlifewebsite.gif" alt="South Staffordshire Goodlife Website" width="136px" Height="25px" /></a>

<a href="http://www.staffordshireprepared.gov.uk/Home.aspx"><img src="http://www.sstaffs.gov.uk/images/newsite/staffsprep.gif" alt="Staffordshire Prepared website" /></a>
<a href="http://www.sstaffs.gov.uk/Home.aspx"><img src="http://www.sstaffs.gov.uk/images/newsite/i54bw.gif" alt="i54 information website" /></a>

<a href="http://www.direct.gov.uk"><img src="http://www.sstaffs.gov.uk/images/newsite/directgov2.gif" alt="DirectGov" /></a>

<br/><br/>

<a style="color: #ffffff; " href="http://www.sstaffs.gov.uk/Default.aspx?page=313">accreditations</a> |  South Staffordshire Council 2012 | <a style="color: #ffffff; " href="http://www.sstaffs.gov.uk/Default.aspx?page=33">Privacy policy and Cookies</a> 



</div>


<script>
function googleTranslateElementInit() {
  new google.translate.TranslateElement({
    pageLanguage: 'en',
    gaTrack: true,
    gaId: 'UA-6726888-1',
    layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL
  }, 'google_translate_element1');
}
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>


</footer>
<immCore:Null><%-->--><--%></immCore:Null>

<!-- content -->
</div>
</div><!-- container -->



</form>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-6726888-1");
pageTracker._trackPageview();
</script>





</body>
</html>

Any advise would be appreciated.

任何建议将不胜感激。

Cheers

1 个解决方案

#1


1  

These aren't a URL at all, hyperlinks must contain URL or an Anchor.

这些根本不是URL,超链接必须包含URL或Anchor。

<li><a href="ILINK|22332,|">Centre Home</a></li>
<li><a href="ILINK|19817,|">Prices</a></li>
<li><a href="ILINK|13380,|">Swimming</a></li>
<li><a href="ILINK|13376,|">Fitness Suite</a></li>
<li><a href="ILINK|13375,|">Exercise Classes</a></li>
<li><a href="ILINK|13374,|">Dry Sports & Courses</a></li>
<li><a href="ILINK|19505,|">3g Astro Pitch</a></li>
<li><a href="ILINK|13322,|"> </a></li>ILINK|22332,|"

URLs should be in format like this (path/filename.fileExtension)

URL应该是这样的格式(path / filename.fileExtension)

e.g. links tags:

例如链接标签:

<li><a href="home.html">Centre Home</a></li>

or

<li><a href="http://www.yousite.com/home.html">Centre Home</a></li>

IE is usually ignoring such errors, unlike the other browsers.

与其他浏览器不同,IE通常会忽略此类错误。

Suggestions:

  1. Avoid using special characters in the folder/files such as (|) and (,). and use (_) or (-) in replace of spaces.

    避免在文件夹/文件中使用特殊字符,如(|)和(,)。并使用(_)或( - )代替空格。

  2. Also don't forget about the case sensitive of URLs (Follow exact url value, Capital letters or 'Upper Case' in file name must remain Capital, do the same with small letters)

    另外不要忘记URL的大小写敏感(遵循确切的url值,大写字母或文件名中的'大写'必须保留为Capital,对小写字母也一样)

#1


1  

These aren't a URL at all, hyperlinks must contain URL or an Anchor.

这些根本不是URL,超链接必须包含URL或Anchor。

<li><a href="ILINK|22332,|">Centre Home</a></li>
<li><a href="ILINK|19817,|">Prices</a></li>
<li><a href="ILINK|13380,|">Swimming</a></li>
<li><a href="ILINK|13376,|">Fitness Suite</a></li>
<li><a href="ILINK|13375,|">Exercise Classes</a></li>
<li><a href="ILINK|13374,|">Dry Sports & Courses</a></li>
<li><a href="ILINK|19505,|">3g Astro Pitch</a></li>
<li><a href="ILINK|13322,|"> </a></li>ILINK|22332,|"

URLs should be in format like this (path/filename.fileExtension)

URL应该是这样的格式(path / filename.fileExtension)

e.g. links tags:

例如链接标签:

<li><a href="home.html">Centre Home</a></li>

or

<li><a href="http://www.yousite.com/home.html">Centre Home</a></li>

IE is usually ignoring such errors, unlike the other browsers.

与其他浏览器不同,IE通常会忽略此类错误。

Suggestions:

  1. Avoid using special characters in the folder/files such as (|) and (,). and use (_) or (-) in replace of spaces.

    避免在文件夹/文件中使用特殊字符,如(|)和(,)。并使用(_)或( - )代替空格。

  2. Also don't forget about the case sensitive of URLs (Follow exact url value, Capital letters or 'Upper Case' in file name must remain Capital, do the same with small letters)

    另外不要忘记URL的大小写敏感(遵循确切的url值,大写字母或文件名中的'大写'必须保留为Capital,对小写字母也一样)