View Full Version : on click do this....<? include("unit3.html"); ?>

08-05-2007, 10:11 AM
Hi, all

I have a ajax page which consists of 5 tabs. I used DW widget.

<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0">Tab 1</li>
<li class="TabbedPanelsTab" tabindex="0">Tab 2</li>
<li class="TabbedPanelsTab" tabindex="0">Tab 3</li>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent"><? include("unit1.html"); ?></div>
<div class="TabbedPanelsContent"><? include("unit2.html"); ?></div>
<div class="TabbedPanelsContent"><? include("unit3.html"); ?></div>
</div>As you can see i sued php inlude command, it icludes all the pages and this makes loading slow. To prevent this i would like my tabs load content when it is clicked.

How can i make my tabs include content when i click it?

Thank you very for the code you'll give.

08-05-2007, 10:40 PM
The includes will run on the server before thhe page is downloaded for the browser to display. To control what is visible you need to show/hide the contents of the appropriate divs.