Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-06-2007, 01:09 AM   PM User | #1
Grant7
New to the CF scene

 
Join Date: Sep 2007
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Grant7 is an unknown quantity at this point
greybox problem

Hi,

I use the greybox script for 2 gallery pages on two websites (same 2 pages on both websites) that point to the same directory (addon domains).

The problem is the greybox works on one of the sites and not the other.

Is there any way to get both galleries working?

I think the problem is the javascript declared in the web pages:

<script type="text/javascript">
var GB_ROOT_DIR = "http://www.mysite.com/greybox/";
</script>

I can only list one of the websites here, not both. I don't particularly want to have two copies of the same web pages as maybe this could look bad to search engines I think, so I was thinking perhaps a way around it may be to redirect the gallery pages that aren't working to the pages that are.

Does anyone have any other suggestions - is there any way to modify that javascript to include multiple websites?

Thanks,

Grant
Grant7 is offline   Reply With Quote
Old 09-06-2007, 10:35 AM   PM User | #2
rwedge
Regular Coder

 
Join Date: Feb 2005
Posts: 679
Thanks: 0
Thanked 16 Times in 15 Posts
rwedge is on a distinguished road
You should be able to run a seperate installation on both web sites.

The script line
Code:
var GB_ROOT_DIR = "http://www.mysite.com/greybox/";

var GB_ROOT_DIR = "http://www.myothersite.com/greybox/";
is the path the the directory in which the grey box script would be installed.
The javascript file includes required by grey box would also point to the same directory
rwedge is offline   Reply With Quote
Old 09-10-2007, 04:36 AM   PM User | #3
Grant7
New to the CF scene

 
Join Date: Sep 2007
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Grant7 is an unknown quantity at this point
Thanks for that, but I'm not sure that solves my problem.

I don't have 4 separate gallery pages that I upload for each website, only two.

The 2 websites I have are both addon domains, that point to the same subdirectory of another website that I have.

So because I only have the two files that both websites work from for my gallery pages, I can't change that line

var GB_ROOT_DIR = "http://www.mysite.com/greybox/";

for the same gallery.

I hope you understand what I mean.

I guess an addon domain is a bit like a parked domain, in that they both point to the same folder and all the different domains point to the same files within that folder.

So for any of my gallery pages, there's only one page, not separate pages for each domain, so I can't change the code for each.

Any help would be appreciated.

Cheers,

Grant
Grant7 is offline   Reply With Quote
Old 09-11-2007, 02:55 AM   PM User | #4
rwedge
Regular Coder

 
Join Date: Feb 2005
Posts: 679
Thanks: 0
Thanked 16 Times in 15 Posts
rwedge is on a distinguished road
I don't know how your subs are set up. If the addons are subdirectories of a single domain the path would be different for each sub.

In general, one domain does not have local access to another domains files.
I'm not sure how the sites are related path wise.
rwedge is offline   Reply With Quote
Old 09-12-2007, 05:55 AM   PM User | #5
Grant7
New to the CF scene

 
Join Date: Sep 2007
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Grant7 is an unknown quantity at this point
I have one subdirectory that both addon domains point to. If I create another subdirectory with the same content won't search engines frown upon that, and is that the only solution to solve my greybox problem here, to have one subdirectory for each addon domain?

Cheers,

Grant
Grant7 is offline   Reply With Quote
Old 09-12-2007, 07:00 AM   PM User | #6
rwedge
Regular Coder

 
Join Date: Feb 2005
Posts: 679
Thanks: 0
Thanked 16 Times in 15 Posts
rwedge is on a distinguished road
Whats the difference between two seperate sites with duplicated content and two sites which share the same common content? Won't they both appear the same?

Without lookiing at the sites and seeing the error its not easy to troublshoot.
Generally, you can link to javascript files on another host as with images, and use them as long as the urls are correct and handled as need in the script.
rwedge is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:05 AM.


Advertisement
Log in to turn off these ads.