PDA

View Full Version : Ajax Content script with one "default" page like in AjaxTabsContent



yurican
02-19-2007, 09:42 AM
1) Script Title:
Dynamic Ajax Content

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

3) Describe problem:

How to use the #default page concept we have on DD Ajax Tabs Content script?
quote:
<li class="selected"><a href="#default" rel="ajaxcontentarea">Intro</a></li>

It will be very useful for me and many other people! :D

jscheuer1
02-20-2007, 04:30 AM
The reason that Ajax Tabs has a default content is that it is hard coded into the target division. In fact, the demo page for Ajax Content already has default content (from the demo's source):


<div id="rightcolumn"><h3>Choose a page to load.</h3></div>

The red part is the default content. Here in Step 2 from the demo page, I've added different 'default' content (red):


Normal link:

<a href="javascript:ajaxpage('test.htm', 'contentarea');">test</a>
<div id="contentarea">Here's some different 'default' content<br>You can have images:<br>
<img src="some.jpg"><br>
Or, whatever HTML content you like here.</div>

yurican
02-20-2007, 07:55 AM
Thanks for reply, John!
But in Ajax Tabs Content we can "return" to default content by clicking the "Intro" tab without reloading the main page.
That is what we want. :)

jscheuer1
02-20-2007, 08:50 AM
Who's we? Anyways, you could make up a page with that content on it as well, easiest way.