EasyUI的panel局部刷新问题

Vick_Weizhuo 2013-08-17 07:09:29
首先我的页面布局,左边是List循环出来的可伸缩面板,然后每个面板里内容是循环下来的子项

我在右边添加了一个子项,然后需要左边面板实现刷新
var pp = window.parent.$('#tttt').accordion('getSelected'); 
if (pp){
pp.panel('refresh',URL);
}


但是我不知道哪个URL指定什么,如果我指定了页面,那么他刷新后面板里却是整个页面



请问我该怎么指定哪个URL
另外我如果不指定哪个URL他不会刷新
...全文
952 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Go 旅城通票 2013-08-18
  • 打赏
  • 举报
回复
左边菜单生成的时候返回数据多增加url就行了吧。。 然后添加click事件获取url加上你的代码
Vick_Weizhuo 2013-08-18
  • 打赏
  • 举报
回复
引用 1 楼 showbo 的回复:
用url返回的内容替换展开的panel的内容。。 refresh param:href Refresh the panel to load remote data. If the 'href' parameter is assigned, it will override the old 'href' property. Code example:

// open a panel and then refresh its contents.
$('#pp').panel('open').panel('refresh');
// refresh contents with a new URL.
$('#pp').panel('open').panel('refresh','new_content.php');
能具体点么,因为我那个展开的面板内容是list读查出来的,那么我应该给个什么URL呢? 或者我定义一个action返回那个LIST 然后使用这个URL访问他,可以么?
Vick_Weizhuo 2013-08-18
  • 打赏
  • 举报
回复
引用 3 楼 showbo 的回复:
左边菜单生成的时候返回数据多增加url就行了吧。。 然后添加click事件获取url加上你的代码
能理解,但是不知道具体怎么写 我现在就是新建了一个页面 内容就是面板里的内容,然后刷新时给定的URL就是这个页面 填充面板 虽然也能达到局部面板刷新,不过感觉很不科学 有例子有代码能贴一下么
Go 旅城通票 2013-08-17
  • 打赏
  • 举报
回复
用url返回的内容替换展开的panel的内容。。 refresh param:href Refresh the panel to load remote data. If the 'href' parameter is assigned, it will override the old 'href' property. Code example:

// open a panel and then refresh its contents.
$('#pp').panel('open').panel('refresh');
// refresh contents with a new URL.
$('#pp').panel('open').panel('refresh','new_content.php');

87,904

社区成员

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

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