Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Regular Coder StealthRT's Avatar
    Join Date
    Aug 2006
    Posts
    185
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Exclamation subdomain and local links problem

    Hey all i am having some weird issues with a site of mine being in a sub domain vs a regular directory.

    When i have a page called reg.asp on the regular directory of the server (http://www.blah.com/blah/reg.asp) it works just fine. However, if i put that same file in a sub domain that I've made (http://sub.blah.com/blah/reg.asp) it doesn't load any java or css for the page as it did with the regular directory one.

    Here is the javacode:
    Code:
    <script type="text/javascript" src="file:///C|/blah/mootools.js"></script>
    Like i said, it works just fine on the regular dirctory but doesn't in the sub domain.

    Any help would be great!
    David

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,635
    Thanks
    6
    Thanked 1,003 Times in 976 Posts
    1. Java is not JavaScript (and vice versa).
    2. Notice anything weird with your file path? How about removing everything before the root slash (so it looks like /blah/mootools.js)?

  • #3
    Regular Coder StealthRT's Avatar
    Join Date
    Aug 2006
    Posts
    185
    Thanks
    14
    Thanked 0 Times in 0 Posts
    VIPStephan:
    The path is fine, like i said it worked in the regular directory. The javascript is on the computer itself so that is why the path is like that. Its viewed using FF.

    My bad, javascript.

    David

  • #4
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Yeah, 'cause I really think that the way of addressing my drives is a letter and a vertical pipe

    Look again.

  • #5
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,635
    Thanks
    6
    Thanked 1,003 Times in 976 Posts
    Quote Originally Posted by StealthRT View Post
    The javascript is on the computer itself so that is why the path is like that.
    You were talking about a sub domain so… I assumed you’re having that file on a server. I’d really suggest you use relative paths there or a server/domain-independent absolute path because really, that local file path is or will be causing more trouble than it needs to be.

    So, change the path to either blah/mootools.js (relative path) or /blah/mootools.js (absolute path without specifying a domain/server) and it should work locally and on a remote server without ever having to change it.

    The relative path setting assumes that the JS file is one level below the file calling it (i.e. the /blah directory and the current file with the script link have to be on the same level/in the same directory). The absolute path setting assumes your file in a /blah directory in the server/site root.

  • #6
    Regular Coder StealthRT's Avatar
    Join Date
    Aug 2006
    Posts
    185
    Thanks
    14
    Thanked 0 Times in 0 Posts
    the javascript wont be hosted on the server, just the computer. Its for a kiosk so the files will be on there for it to bring up. I just dont understand why it would work using the regular directory vs the sub domain one...

    David

  • #7
    New Coder
    Join Date
    Oct 2007
    Posts
    84
    Thanks
    0
    Thanked 8 Times in 8 Posts
    Mayhaps, you have set the regular domain as a trusted site and the subdomain is not set the same way.

  • #8
    Regular Coder StealthRT's Avatar
    Join Date
    Aug 2006
    Posts
    185
    Thanks
    14
    Thanked 0 Times in 0 Posts
    Already put it in my list, still nothing...

    David

  • #9
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Look, a file path for Windows using a C drive begins C:\, not C|\, as you've put here:
    Code:
    ... file:///C|/blah/mootools ...
    Last edited by Apostropartheid; 12-26-2007 at 02:53 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •