sheetal369
sheetal369

Reputation: 1

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.

Upvotes: 0

Views: 184

Answers (2)

trickwallett
trickwallett

Reputation: 2468

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'

Upvotes: 0

Mario Awad
Mario Awad

Reputation: 1439

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 :)

Upvotes: 0

Related Questions