PDA

View Full Version : Ajax Tabs Content Script (v 2.0)



jeffsalam
11-10-2007, 12:34 AM
hi;

i have been using Demo #3- All contents fetched via "IFRAME" , but when I click on the tab and it loads the content , I do no see the loading.gif image .

my var in ajaxtabs.js looks like :

var ddajaxtabssettings={}
ddajaxtabssettings.bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
ddajaxtabssettings.loadstatustext="<img src='ajaxtabs/loading.gif' /> Requesting content..."

Any help would be appreciated.

tks...:confused:

URL to script: http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/

ddadmin
11-10-2007, 07:32 AM
The "loading" message only appears when a content is fetched via Ajax, and not IFRAME. With the later, all the script is doing is loading a page into it, similar to a browser loading a new page into a new window.

jeffsalam
11-12-2007, 07:59 PM
thanks ddadmin;

how can I do a content is fetched via Ajax, but with using using Demo #3 theme ?

thanks

ddadmin
11-12-2007, 09:30 PM
You're not tied down to any theme when specifying whether the tab contents are fetched via Ajax or IFRAME. This is all explained on the script page already actually. So to modify the HTML of theme #3 to fetch its contents via Ajax, you would do something like:


<div id="pettabs" class="indentmenu">
<ul>
<li><a href="external1.htm" rel="#somecontainer" class="selected">Tab 1</a></li>
<li><a href="external2.htm" rel="#somecontainer">Tab 2</a></li>
<li><a href="external3.htm" rel="#somecontainer">Tab 3</a></li>
<li><a href="external4.htm" rel="#somecontainer">Tab 4</a></li>
</ul>
<br style="clear: left" />
</div>

Where "somecontainer" is the ID of the DIV that will house the Ajax fetched content.

jeffsalam
11-13-2007, 02:14 AM
thanks so much ddadmin;

it worked and was simple.

I also need help with the background image that goes in the tabs. how I can put an image in the tabs that has a w 100 and h of 30. I have 2 sets of images , one for on and one for off state.


thanks:)

ddadmin
11-13-2007, 10:20 AM
I also need help with the background image that goes in the tabs. how I can put an image in the tabs that has a w 100 and h of 30. I have 2 sets of images , one for on and one for off state.

thanks:)

This is more of a CSS question then. It really depends on what you have in mind for the tabs' look. If you're styling the tab's background image (for both the "over" and "out" states), try playing around with a CSS menu that uses this technique, for example, this one (http://www.dynamicdrive.com/style/csslibrary/item/glowing-tabs-menu/). Otherwise, if your tabs themselves are created using images (not their background image), then you're using dealing with rollover graphic buttons (http://www.javascriptkit.com/javatutors/image4.shtml).

jeffsalam
02-26-2008, 07:34 PM
thanks so much ddadmin for you help !

now that i got the script working , when the script calls an external page via ajax, some of the charecters ( like or ) look funny on the screen . the content of the external l file comes from database.

appreciate you help.

thaanks..

jeff

davorelli
04-30-2008, 03:59 AM
The "loading" message only appears when a content is fetched via Ajax, and not IFRAME. With the later, all the script is doing is loading a page into it, similar to a browser loading a new page into a new window.

Is there a way to have the same loading message display in iframe (just like with Ajax), while the external page is loading?
Help much appreciated.

Cheers,

Davor

ddadmin
04-30-2008, 06:52 AM
Davorelli, in the future, please start a new thread when asking your own question on a DD script. To your question, this has been answered before, basically no unfortunately: http://www.dynamicdrive.com/forums/showthread.php?p=139733

davorelli
04-30-2008, 10:21 PM
Thanks ddadmin.
Sorry about cutting in, but I thought that I would be easier for you figure out what I'm asking if I just continue on an existing thread/topic.

Cheers,

Davor