0
我想從這個線程在StackOverflow上的的Oracle APEX運行這段代碼,它看起來好像setTimeout調用不工作的猜想:的setTimeout不工作的Oracle APEX
[see thread][1]
<html lang="en">
<head>
<title>Dashboard Example</title>
<style type="text/css">
body, html { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; }
iframe { border: none; }
</style>
<script type="text/javascript">
var Dash = {
nextIndex: 0,
dashboards: [
{url: "http://www.google.com", time: 5},
{url: "http://www.yahoo.com", time: 10},
{url: "http://www.stackoverflow.com", time: 15}
],
display: function()
{
var dashboard = Dash.dashboards[Dash.nextIndex];
frames["displayArea"].location.href = dashboard.url;
Dash.nextIndex = (Dash.nextIndex + 1) % Dash.dashboards.length;
setTimeout(Dash.display, dashboard.time * 1000);
}
};
window.onload = Dash.display;
</script>
</head>
<body>
<iframe name="displayArea" width="100%" height="100%"></iframe>
</body>
</html>
如果有人與Oracle APEX可以請在v3.0.1中試試這個,然後讓它出來,請讓我知道如何。
謝謝。
瞭解它在IE6中的工作正常,但只是爲了讓您知道,而不是使用框架,我實際上更改代碼以引用iframe src使用document.getElementById(「iframe」)。src = dashboard.url I認爲問題出在Apex的setTimeout調用中。作爲一個測試Tony,在上面的代碼中創建一個虛擬函數,用於警告消息並使用setTimeout(「yourFunction();」,5000)調用該函數,並希望看到它不起作用。 請讓我們知道 - 謝謝。 – tonyf 2010-06-29 14:59:00
此外,我使用我的Intranet網址,而不是在我的代碼中引用google.com或stackoverflow網址。 – tonyf 2010-06-29 14:59:49
好的,我沒有Apex 3.0,但在apex.oracle.com上用Apex 4.0測試過,它工作正常:http://apex.oracle.com/pls/otn/f?p=37742:1 – 2010-06-29 15:10:44