setTimeout不能使用Oracle Apex

编程入门 行业动态 更新时间:2024-10-14 08:24:13
本文介绍了setTimeout不能使用Oracle Apex的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图从Oracle ApeX中的StackOverflow中的此线程运行此代码,并且它看起来好像setTimeout调用不起作用:

I am trying to run this code from this thread in StackOverflow in Oracle ApeX and it looks as if the setTimeout call is not working as suppose to:

[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: "www.google", time: 5}, {url: "www.yahoo", time: 10}, {url: "www.stackoverflow", 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中试用这个版本,我知道怎么做。

If somebody with Oracle ApEx could please try this in v3.0.1, and get it going, pls let me know how.

谢谢。

推荐答案

关于Apex - 实际上你可以把你发布的HTML,保存到一个文件,然后在浏览器中运行该文件来测试它。

This problem is nothing to do with Apex - in fact you can take the HTML you posted, save it to a file, and run that file in a browser to test it.

不幸的是,www .google是一个不适用于此代码的网址,因为它包含一些自己的framebustingJavascript,它会将其从框架弹出到浏览器窗口中,之后您的代码不再运行。 stackoverflow做类似的事情。 例如,如果您将第一个URL更改为www.bbc,那么它可以工作(无论如何),直到它到达stakoverflow时,它会弹出框架。

Unfortunately, www.google is a URL that will not work with this code, because it contains some "framebusting" Javascript of its own that pops it out of the frame into the browser window, after which your code is no longer running. stackoverflow does something similar. If you change the first URL to www.bbc for example then it works (on IE anyway) until it gets to stakoverflow, when it pops out of the frame.

更多推荐

setTimeout不能使用Oracle Apex

本文发布于:2023-06-06 01:34:40,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:setTimeout   Oracle   Apex

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!