开发者

refresh div not whole page

Here is my code:

main.php:

<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
<div id="TabbedPanels1" class="TabbedPanels" align="left">
  <ul class="TabbedPanelsTabGroup">
    <li class="TabbedPanelsTab" tabindex="0">Member Group</li>
    <li class="TabbedPanelsTab" tabindex="0">Fine Group</li>
    <li class="TabbedPanelsTab" tabindex="0">Department</li>
    <li class="TabbedPanelsTab" tabindex="0">Member</li>
  </ul>
 <div class="TabbedPanelsContentGroup">
    <div class="TabbedPanelsContent">  <?php include 'menage member group.php'; ?></div>
    <div class="TabbedPanelsContent"> <?php include 'manage fine group.php'; ?></div>
    开发者_开发技巧<div class="TabbedPanelsContent"> <?php include 'manage department group.php'; ?></div>
    <div class="TabbedPanelsContent"> <?php include 'manage member main.php'; ?></div>
  </div>
</div>
<script type="text/javascript">
<!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
</script>

when I click submit button which contain in menage member main.php.the whole page will be refreshed.


Look around for AJAX tutorials and you'll find an answer. You can't do this with PHP alone as you'll also need JavaScript or a JavaScript library like jQuery. Good luck :)


Submit buttons, by design, will have the affect of refreshing the page, unless you use stuff like client side scripting to override this behaviour.

Techniques like AJAX can overcome this feature, although there is still some debate over if it really is as much an issue as it seems.

As a general comment, I'd avoid using spaces in filenames e.g. 'menage member group.php'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜