2013-08-01 31 views
4

一直在使用形式的三江源頁面上的以下重定向回的形式在5秒內,並整齊地值預填姓名字段:location.href不是重定向到https://開頭的URL

<script> setTimeout(function() {location.href = '<?php echo $var3['returnurl'] ?>?fullName[first]=<?php echo $var1['first'] ?>&fullName[last]=<?php echo $var2['last'] ?>'}, 5000); </script> 

很有效,直到returnurl字段是https:// url。 然後,它停留在謝謝頁面上,嘗試執行重定向。 有沒有參與的I幀....試圖top.location.href ......不會......甚至試圖location.replace

任何人都可以看到可能影響重定向到代碼的任何限制https://網址。

代碼的PHP文件...

<!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> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no"> 
    <meta name="HandheldFriendly" content="True"> 
    <meta name="MobileOptimized" content="width"> 

    <title>Thankyou</title> 

    <style type="text/css"> 

body 
{ 
margin: 0px; 
padding: 0px; 
background: #fff; 
font-family: Arial; 
} 

#message 
{ 
position: absolute; 
left: 50%; 
width: 320px; 
margin-left: -160px; 
} 

</style> 

<?php 
$answers = $_POST; 
$var1 = array("first" => $answers[fullname][0]); 
$var2 = array("last" => $answers[fullname][1]); 
$var3 = array("returnurl" => $answers[returnurl]); 
?> 

</head> 

<body> 

<script> 
    setTimeout(function() {location.href = '<?php echo $var3['returnurl'] ?>?fullName[first]=<?php echo $var1['first'] ?>&fullName[last]=<?php echo $var2['last'] ?>'}, 5000); // this duration is in millisecs 
</script> 

<div id="message"> 

<p>&nbsp;</p> 
<div style="text-align: center;"><h1>Thank You!</h1></div> 
<div style="text-align: center;">Your submission has been received.</div> 
<div style="text-align: center;">We're most grateful</div> 
<div style="text-align: center;">&nbsp;</div> 
<div style="text-align: center;"><img src="http://www.mazeguy.net/bigsmilies/thumbsup.gif"></img></div> 
<div style="text-align: center;">&nbsp;</div> 
<div style="text-align: center;">You will return in 5 seconds</div><br /> 

</body> 
</html> 

這裏是......的三江源頁面源顯示...是安全網頁的網址並非通過通過了提交的結果....

<script> 
setTimeout(function() {location.href = '?fullName[first]=&fullName[last]='}, 5000); //  this duration is in millisecs 
</script> 
+4

請向我們展示呈現的HTML。 – Dai

+0

是實際嵌入在頁面中的腳本,還是僅用於我們的可讀性?我的意思是它包含像你的頁面上的

相關問題