on click do this....<? include("unit3.html"); ?>

They have: 5 posts

Joined: Jul 2007

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>
  </ul>
  <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.

He has: 1,380 posts

Joined: Feb 2002

Well, spelling things correctly always makes your posts easier to read...

You'll have to use XMLHttpRequest to do that. You can use pre-written libraries like Prototype (http://www.prototypejs.org) to do this.

They have: 5 posts

Joined: Jul 2007

brady.k;222688 wrote: Well, spelling things correctly always makes your posts easier to read...

You'll have to use XMLHttpRequest to do that. You can use pre-written libraries like Prototype (http://www.prototypejs.org) to do this.

You are right about my spelling, i had to write it urgently. I am sorry for that.

The webpage link you gave did not help me. All i need is to stop my tabs include all the content. ıf i can include them when clicked, there will be no problem.

I am giving whole page, if you could edit and send back i'll be glad. Thank you so much...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
p.MsoNormal {
margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
}
-->
</style>
<style type="text/css">
<!--
li.MsoNormal {
margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
}
-->
</style>
&lt;script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"&gt;&lt;/script&gt;
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
</head>

<body>
<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>
  </ul>
  <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>
</div>
&lt;script type="text/javascript"&gt;
<!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
&lt;/script&gt;
</body>
</html>
'

i didnt write css and javascript code.

He has: 1,380 posts

Joined: Feb 2002

We aren't going to make your site for you. We will help you figure out how, and help you debug if you get stuck, but it's not our project to do.

That website will help you, if you take the time to read.

If you want to load dynamically, you're going to have to use "AJAX". If you want to load pre-emptively, and just hide until ready, you'll have to use some average-level JS.

Decide which, and I can give you more info.

They have: 5 posts

Joined: Jul 2007

I can understand your opinion and respect, you don't give fish rather teach how to fish. I appreaciate your ideas. I always tried to learn php, but by using explicit methods it is so hard, implicitly it is easier and better. The best way trying and learning from other people. I learnt css by doing so.

Thank you very much, i'll disturb you if i need help...

Thanks for the webpage and help people around...

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.