window.location调用在safari上弹出空对话框 [英] window.location call popup up empty dialog on safari

查看:147
本文介绍了window.location调用在safari上弹出空对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个网页上,我试图将浏览器重定向到同一站点上的另一个页面. 该代码非常简单:

on a web page i am trying to redirect the browser to another page on the same site. the code is very simple for that:

window.location = "/path1/path2"

Safari上的

-Windows和Mac上-仅包含文本的消息框

on safari - both windows as well as mac - a message box containing only the text

"http://domain.com"

出现.

我尝试了不同的方式指定此位置:location.href,windows.assign(...)...且所有行为都相同.

I have tried different ways of specifying this: location.href, windows.assign(...) ... and the all have the same behavior.

你们有没有看到这个?您对此有解决方案吗?

Did any of you see this? and do you have a solution for this?

谢谢.

推荐答案

感谢您的帮助.

我发现了问题.在调用窗口中将window.location设置为某个位置之前,一个函数会发出ajax请求.

i found the problem. Before setting window.location somewhere in the call chain one function would make an ajax request.

似乎由于某些更改,请求现在需要的时间比以前更长.因此,如果在ajax请求期间更改了位置,则会显示一个空消息框.

It seem that due to some changes the request now takes longer then before. So if the location was changed during the ajax req., the empty message box would appear.

梅米.

这篇关于window.location调用在safari上弹出空对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆