window.location.href 报脚本错误

gr_Gong 2011-08-21 02:34:14
在Ext.Net中 我项目中有个用户控件,用户控件中有个GridPanel
在GridPanel的GridCommand 的点击事件

function OperationF(command, grid, hidden, record, window, Path) {
if (command == "Zoom") {
//文件类型
window.location.href = '../../ViewDoc.aspx?FilePath=' + Path;
window.show();
}

页面运行的时候报这样的脚本错误('location' is null or not an object)
请高手指点
...全文
179 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
一品 2011-08-22
  • 打赏
  • 举报
回复
你的window要看你传进来的是什么。是EXT你自己创建的对象,还是浏览器本身的?
  • 打赏
  • 举报
回复
[Quote=引用楼主 gr_gong 的回复:]
window.show();
[/Quote]
show()?这不是window对象标准方法。这个window对象是否是原装的也就不好说了。
  • 打赏
  • 举报
回复
把window.location.href改成window.location。

87,990

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧