0
我想从同一窗口中的弹出窗口打开链接,然后关闭弹出窗口。window.location.href在弹出窗口中不起作用
我这这是类似我一直在寻找:open the link from the popup window in an external window and then close the original popup window
我想的是,解决方案及其关闭,我想弹出而不是重定向到指定的URL。
我在这,因为我在loading php page with class in javascript
现在提到我已经使用弹出窗口PHP页面e.g页A,在其上弹出窗口打开correct.php,我有一个按钮。为此,我使用下面的解决方案,它不重定向到url:
<input type="button" value="Search" ONCLICK="window.location.href='https://www.google.co.in/';parent.$.colorbox.close();">
什么可能是不打开指定的网址的原因?
@ user3824319:我有点困惑。你能解释你的答案吗?所以我可以用我的代码来尝试。谢谢。 – kiran
只需创建两个php页面user.php和user_admin.php。复制并粘贴代码。首先运行user_admin.php。它会使用脚本打开user.php。在user.php代码运行后。弹出窗口将关闭。 这是关闭弹出窗口的脚本 –