PDA

View Full Version : Ajax Tabs Content script



cfemocha
09-09-2006, 08:32 AM
1) Script Title: Ajax Tabs Content script

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

3) Describe problem:

Im trying to have multiple Ajax tabs. The following script works fine if i have the tabs on the same page, i.e.


<ul id="maintab" class="shadetabs">
<li><a href="external.htm" rel="ajaxcontentarea">Bird</a></li>
<li><a href="external2.htm" rel="ajaxcontentarea">Dog</a></li>
</ul>

<div id="ajaxcontentarea" class="contentstyle">
<p>Default Content...</p>
</div>

<ul id="newstab" class="shadetabs">
<li><a href="external.htm" rel="newscontentarea">Local</a></li>
<li><a href="external2.htm" rel="newscontentarea">World</a></li>

</ul>

<div id="newscontentarea" class="contentstyle">
<p>Default Content...</p>
</div>

<script type="text/javascript">
startajaxtabs("maintab", "newstab")
</script>

But what I'm trying to achieve is to have the second ajax tabs inside one of the page (i.e. external.htm), it then fails to work. Is it still possible to do?

Any help is appreciated.

ddadmin
09-09-2006, 09:40 AM
While the external page to fetch via Ajax can contain external .css or .js files, such as those that make up the Ajax tab content script, it's buggy in some versions of IE, and basically won't work reliably. I really wouldn't recommend it, and you're better off using the inline Tab content script (http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm) if one of the contents contain additional JS or CSS.

gregory
10-17-2006, 02:00 PM
How do I load another page (through a link) from within the relcontentarea?
I've tried several options, but haven't found the solution yet

VatsaL
10-26-2006, 12:01 PM
While the external page to fetch via Ajax can contain external .css or .js files, such as those that make up the Ajax tab content script, it's buggy in some versions of IE, and basically won't work reliably. I really wouldn't recommend it, and you're better off using the inline Tab content script (http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm) if one of the contents contain additional JS or CSS.

Im using the same ajax script and trying to insert the inline script you suggested inside the ajax script.
I've mentioned the tabcontent.js and tabcontent.css in the ajax list for it to load, and inspite of that the inline tab script dosent show its content when displayed in one of the ajax tabs.

HELP!!!

thanks


VatsaL

Metellus
10-26-2006, 03:47 PM
I use ajax tabs loading external htmlpages on the fly. And generally the script works fine -> as long as i do not use special characters like and so on - characters of german language.

the main page, that uses ajax tab-scripts has charset=iso-8859-1. when requesting an external page containing one of the above special chars, they are then displayed faulty. e.g. in firefox it is a questionmark.

seems, as if the characters are getting lost through the xmlbased request, ajax uses.

is there a way to tell ajax, that these special chars should be managed in a certain way? and if so - in which part of the script shall i include it?

can anyone help?

fetloser
01-27-2007, 08:46 AM
I use ajax tabs loading external htmlpages on the fly. And generally the script works fine -> as long as i do not use special characters like and so on - characters of german language.

the main page, that uses ajax tab-scripts has charset=iso-8859-1. when requesting an external page containing one of the above special chars, they are then displayed faulty. e.g. in firefox it is a questionmark.

seems, as if the characters are getting lost through the xmlbased request, ajax uses.

is there a way to tell ajax, that these special chars should be managed in a certain way? and if so - in which part of the script shall i include it?

can anyone help?

Hi!

Not Seeing this is a bit late I guess you may have solved it already. I'll post the solution anyway since someone else might be interested :)

I've had your problem as well, but with swedish characters, all I had to do was insert


header('Content-type: text/html; charset=ISO-8859-1');

just below the opening php tag in whatever file i had the tabs script fetch.

You'll of course have to put your own charset there if this is wrong for you.

Cheers

jesago
01-28-2007, 04:08 AM
Sorry dear friend, but i don't in you when you say just below the opening php, what do you mean friend?, i would like you explain me please, because I am trying to make this to much time... because I tried to make that you say, but it does not work... or maybe I am doing something wrong

fetloser
02-06-2007, 02:34 PM
Sorry, haven't logged on in a while. This is an opening tag


<?php

Usually at the top of a php page