View Full Version : Ajax Tabs Content script

09-19-2007, 10:38 PM
1) Script Title: Ajax Tabs Content script

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

3) Describe problem: The problem is simple but i couldnt solve it. i want to use ajax tabs content in my site so i downloaded it... there is 1 demo page and 4 external pages.i wrote the content in the ajax tabs content and saved it and when i opened it on the explorer 6.0 i see Turkish letters ( ş İ ) dont seem normal... then i re open demo page and make this :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html; charset=windows-1254">

then i saved and than its ok Turkish letters is ok now... but the problem is i dont know what to do for external pages... i tryed pasting same code but it didnt work... demo page is ok now but i still cant see Turkish letters on external pages .

note : when i open external pages by itself in a explorer Turkish letters is ok but when i try to see external pages with ajax tabs script Turkish letters dont seem normal... Ty for help.

09-19-2007, 11:50 PM
The charset issue with Ajax has been discussed in a few past threads as well. To be honest I've never really looked into it, but based on a search on Google, the solution seems to vary, from calling:

httprequest.overrideMimeType('text/html; charset=windows-1254')

before the Ajax request is sent inside the .js file, to using scripting to do a search and replace of the offending characters.

The first suggestion might be worth a try. Inside ajaxtabs.js, make the following change (in red):

if (page_request.overrideMimeType)
httprequest.overrideMimeType('text/html; charset=windows-1254')
var ullist=targetobj.parentNode.parentNode.getElementsByTagName("li")

Test this out in Firefox to see if it makes a difference.