需要一些帮助。
我一直在尝试实施Klipfolio仪表板,似乎我无法让它在办公室工作。我真的不知道为什么。当使用IE时它不能正常工作但使用Chrome或Firefox它可以正常工作。
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<script src="Scripts/jquery-1.8.3.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function () {
// initialize
function initKlipfolioSSO(onSuccess, onError) {
$.ajax({
url: "https://app.klipfolio.com/users/sso_auth",
xhrFields: {
withCredentials: true
},
crossDomain: true,
contentType: "application/json",
headers: {
"KF-SSO": "07U0rGlLbLevocLRIzHoChJdDTT7C7VlufgvU1ExrcrrBS7dwidFWaTr5l8ONrzUOw+Dq8wHFPVFjE5ycx5t4Uddi+RcDvS8WANWwH9IDKI=",
"KF-Company": "4b1a81c1d9005e1ac78f33aaac465e6f"
},
dataType: "json",
success: function (data) {
onSuccess(data);
},
error: function (err) {
onError(data);
}
})
};
$("#btnSubmit").click(function () {
initKlipfolioSSO(
function (data) { document.location = "https://app.klipfolio.com/dashboard" },
function (data) { alert("Dashboard is temporarily unavailable."); }
);
})
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input style='margin-top: 10px' type='button' id='btnSubmit' value='Submit SSO Token' /></div>
</form>
</body>
</html>