Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

subdomain page not working

Page jscript not rendering properly



5:56 am on May 5, 2008 (gmt 0)

10+ Year Member

I use a .js included menu in my html pages in my subdomains and half the menu works fine, but the other half not.

It behaves as intended and written when the page is called from the folder; i.e., example.com/subdom/index.htm - but breaks when called as subdom.example.com

Both parts of the script contain only absolute links.


1:51 pm on May 6, 2008 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

> Both parts of the script contain only absolute links.

If that is true, it's difficult to understand why you'd have a problem.

For further investigation, I'd suggest a review of your server error log file, and using a server headers checker such as the "Live HTTP Headers" add-on for Firefox and Mozilla-based browsers. Using these tools, you can get a better view of the requests that the server is receiving, the filepaths that the requested URLs resolve to, and the responses that your server is sending to the client.



4:36 am on May 7, 2008 (gmt 0)

10+ Year Member

Thanks for your reply jdMorgan -
Nothing shows on the error log
I moved the .js into the same folder as the index file and it all works as expected.

There seems to be some unexpected results when calling included files from a sub-domain, but I can't find any "rule of Thumb" to explain so I can understand it.
I have had similiar problems in the past with Style sheets not working when requested from the root folder to a sub-domain.

If someone you point me to a solution to this I will be very grateful. (Please do not use tech language to explain) I have read lots of posts/replies about .htaccess and folders, but can't get my head around it because I don't understand the tech terminology.


6:50 am on May 8, 2008 (gmt 0)

10+ Year Member

I found most of the answer on a different forum.
"the subdomain is a different domain altogether, and relative links will only work within the same webspace" - therefore links to another folder(even though they are on the same server) need to be absolute.

So simple :-)

Featured Threads

Hot Threads This Week

Hot Threads This Month