SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot
    Join Date
    May 2008
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Safari can't link to javascript stylesheet!

    When I have the code in the html file everything is fine but when I link it to a stylesheet Safari fails to read the javascript. In all other browsers works fine.

    This is how I linked it
    Code:
    <link rel="stylesheet" type="text/javascript" href="../main.js" title=""/>
    <link href="../main.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="../main.js"></script>
    Help please!

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've never used the <link> tag to point to a js file, nor am I sure that is valid.

    Does it work if you get rid of the first line?

  3. #3
    SitePoint Zealot
    Join Date
    May 2008
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah the first line was none sense. If I get rid of it it still does not work in Safari. I'm using 3.1.1 version. If you want you can check it out at www.cookiecutterrecords.com. The six images should swap image on mouse over.

  4. #4
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried to access that URL but it didn't load

  5. #5
    SitePoint Zealot
    Join Date
    May 2008
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It should do so try in a bit

  6. #6
    SitePoint Guru
    Join Date
    Sep 2006
    Posts
    731
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Andres Vaquero View Post
    It should do so try in a bit
    Safari is failing to load 'main.js', possibly as a result of the earlier attempt to load it as a stylesheet. Can you remove that link tag and re-upload?
    Tab-indentation is a crime against humanity.

  7. #7
    SitePoint Zealot
    Join Date
    May 2008
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great! It worked as you said! The strange thing is that when I load it from the file in my computer it doesn't work. Machines...

    Thank you!


Bookmarks

Posting Permissions

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