PDA

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



sutinse
11-13-2008, 01:09 PM
1) Script Title:
Ajax Tabs Content Script (v 2.2)

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

3) Describe problem:
Error because of using window.location.hostaname in script
Should be window.location.host.
The host will contain a port, where appropriate

//Dont use window.location.hostname, USE window.location.host (contains also port)
//var ajaxfriendlyurl=pageurl.replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.hostname+"/")
var ajaxfriendlyurl=pageurl.replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.host+"/")