我怎样才能让一个div刷新到整个页面的提交状态? [英] how can I get just a single div to refresh on submit as apposed to the entire page?

查看:56
本文介绍了我怎样才能让一个div刷新到整个页面的提交状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理用PHP编写的动态生成的页面.页面的divon包含列出的内容,这些内容列出了打开编辑屏幕的FancyBox链接. 编辑完成后,用户关闭FancyBox模式,更改 需要反映在父页面上.

I am working with a dynamically generated page written in PHP. The divon the page contain contents listed FancyBox links that open editing screens. Once editing is complete and the user closes the FancyBox modal the changes need to be reflected on the parent page.

对,所以我能够找到一种解决方案,该方法可以在提交时刷新整个页面 使用

Right, so I was able to find a solution that refreshes the entire page on submit using

  parent.location.reload (true);

刷新整个父页面.但是,这会导致浏览器提示 这让用户感到困惑,并且有点过分杀人,因为我真的只是 需要编辑的信息才能刷新.

to refresh the entire parent page. But, that causes a browser prompt that is confusing to users and a bit of over kill as I really only need the information edited to refresh.

我怎样才能让一个div刷新为 置于整个页面上??????

how can I get just a single div to refresh on submit as apposed to the entire page??????

推荐答案

您需要通过AJAX提交表单.由于您使用的是使用jQuery的东西,因此您可以使用它来完成它.

You need to submit the form through AJAX. Since your using something that uses jQuery, you can use it to do it.

此处您可以找到有关操作方法的教程

Here you can find a tutorial on how to do it

这篇关于我怎样才能让一个div刷新到整个页面的提交状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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