我有一个Sitecore 7网站,其中包含一个嵌入在子网页上的SurveyMonkey弹出式邀请表单。我注意到在Chrome,FireFox和Safari中,当我访问该特定页面时,该表单不会自动显示。如果我离开页面然后回来(就像点击浏览器中的后退按钮一样),那么表格就会出现。我没有在开发控制台中看到任何错误,表明可能有任何错误。
奇怪的是,如果我在IE浏览器中,表单会自动显示在子页面上 - 完全没有问题。
我尝试在Survey Monkey上查找任何疑难解答提示,但无法找到与此问题相关的任何内容,也无法在Google搜索中找到任何有用的内容。
之前有没有人在Survey Monkey中遇到过这种情况?这非常令人沮丧,因为我无法看到弹出窗口在3个主流浏览器中无法正常工作的原因。
供参考,这是嵌入代码:
<%@ Control Language="c#" AutoEventWireup="true" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" Inherits="Layouts.Testproductdetails.TestproductdetailsSublayout" CodeFile="~/layouts/Test/testProductDetails.ascx.cs" %>
<%@ Register TagPrefix="sc" Namespace="Sitecore.Web.UI.WebControls" Assembly="Sitecore.Kernel" %>
<div class="subpage-subheading">Redacted</div>
<div class="subpage-header Item-No">
<sc:Text runat="server" ID="ProductNO" />
</div>
<div class="subpage-product-right-mobile clearfix">
<sc:Image runat="server" ID="FullSizeImage" CssClass="ProductTypeImage" />
<div class="subpage-product-right-img-lbl-mobile">
<sc:Text runat="server" ID="ProductNoSmallMobile" />
</div>
</div>
<div class="subpage-left-content-block">
<sc:Text runat="server" ID="Description" />
<asp:HyperLink runat="server" Visible="false" ID="ShopOnline" target="_blank" class="Shop-Btn">
Shop Online
</asp:HyperLink>
<a href="#" class="buttonType1 RequestInfo Req-Info-Btn">Request Info</a>
</div>
<div class="subpage-product-right">
<sc:FieldRenderer ID="ProductImage" runat="server" CssClass="categoryImage" />
<div class="subpage-product-right-img-lbl">
<sc:Text runat="server" ID="ProductNoSmall" />
</div>
</div>
<div class="product-detail-divider"></div>
<asp:Literal runat="server" ID="Downloads" />
<script type="text/javascript">
jQuery.noConflict();
(function ($) {
$(function () {
$(document).ready(function () {
$("#ShowLargeImage").fancybox();
$("#viewMoreCompats").click(function (e) {
e.preventDefault();
$("#ExtraCompatibleDevices").toggle("slow");
if ($("#viewMoreCompats").html() == "View More +") {
$("#viewMoreCompats").html("View Less -");
}
else {
$("#viewMoreCompats").html("View More +");
}
$(".productDetailSection img").each(function () {
var img = $(this);
if (img.width() > 140) {
img.css({ 'width': '140px' });
}
});
});
$("#viewMoreCompats2").click(function (e) {
e.preventDefault();
$("#ExtraCompatibleDevices2").toggle("slow");
if ($("#viewMoreCompats2").html() == "View More +") {
$("#viewMoreCompats2").html("View Less -");
}
else {
$("#viewMoreCompats2").html("View More +");
}
$(".productDetailSection img").each(function () {
var img = $(this);
if (img.width() > 140) {
img.css({ 'width': '140px' });
}
});
});
$("#viewMoreAccessories").click(function (e) {
e.preventDefault();
$("#ExtraAccessories").toggle("slow");
if ($("#viewMoreAccessories").html() == "View More +") {
$("#viewMoreAccessories").html("View Less -");
}
else {
$("#viewMoreAccessories").html("View More +");
}
$(".productDetailSection img").each(function () {
var img = $(this);
if (img.width() > 140) {
img.css({ 'width': '140px' });
}
});
});
$("#viewMoreAccessories2").click(function (e) {
e.preventDefault();
$("#ExtraAccessories2").toggle("slow");
if ($("#viewMoreAccessories2").html() == "View More +") {
$("#viewMoreAccessories2").html("View Less -");
}
else {
$("#viewMoreAccessories2").html("View More +");
}
$(".productDetailSection img").each(function () {
var img = $(this);
if (img.width() > 140) {
img.css({ 'width': '140px' });
}
});
});
$("#tab1").fancybox({
//'title': $("#tab1").html()
});
$("#tab2").fancybox({
//'title': $("#tab2").html()
});
$(".productDetailSection img").each(function () {
var img = $(this);
if (img.width() > 140) {
img.css({ 'width': '140px' });
}
});
});
});
})(jQuery);
</script>
<div class="TABLE-CONTAINER clearfix" style="margin-bottom: 30px;">
<div class="product-detail-header-row clearfix">
<div class="product-specs-header">
product specifications:<br>
</div>
<div id="tabbedLinks">
<div class="product-tbl-link">
<asp:Literal runat="server" ID="tab2" />
</div>
<div class="product-tbl-link">
<asp:Literal runat="server" ID="tab1" />
</div>
</div>
</div>
<asp:Literal runat="server" ID="attributes" />
</div>
<asp:Literal runat="server" ID="CompatibleProducts" />
<asp:Literal runat="server" ID="CompatibleProducts2" />
<asp:Literal runat="server" ID="Accessories" />
<asp:Literal runat="server" ID="Accessories2" />
<script type="text/javascript">
jQuery.noConflict();
(function ($) {
$(function () {
$(document).ready(function () {
// Request Info
$('.RequestInfo').click(function (event) {
var url = "/Redacted/otherpages/requestinformation.aspx?In Reference To=Item: " + $(".Item-No").html().trim();
var width = 735;
var height = 710;
$.fancybox({
'title': 'Request Information',
'autoDimensions': false,
'width': width,
'height': height,
'titlePosition': 'inside',
'href': url,
});
event.preventDefault();
});
});
});
})(jQuery);
</script>
<asp:Literal ID="DownloadScript" runat="server" />
<div class="productDetailSection">
<div id="contentTab1" style="display: none" class="noPrint">
<div class="show">
<asp:Literal runat="server" ID="Tab1Content"></asp:Literal></div>
</div>
<div id="contentTab2" style="display: none" class="noPrint">
<div class="show">
<asp:Literal runat="server" ID="Tab2Content"></asp:Literal></div>
</div>
</div>
<!--Survey Code -->
<sc:Placeholder runat="server" Key="SurveyCode"></sc:Placeholder>