Javascripts not transferring properly

Discussion in 'Web Design and Development' started by memco, Oct 7, 2009.

  1. memco macrumors 6502

    Joined:
    May 1, 2008
    #1
    If you visithttp://www.ktlw.org/schedules/schedule.asp you'll see that there are three javascript files included in the header. For some reason, I can only get one of them to load properly at a time. Webkit's inspector shows that the files are being transferred with the wrong MIME type, but I'm not sure why that is or if this is the real issue. I do know that the two jquery scripts run fine on my other site, and the sfhover.js has been running fine until I tried to add in the jquery stuff. Any help is greatly appreciated.
     
  2. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #2
    They appear to be loading fine.

    The order seems wrong, i.e.

    Code:
    <script type="text/javascript" src="[URL="http://forums.macrumors.com/view-source:http://www.ktlw.org/_includes/sfhover.js"]http://www.ktlw.org/_includes/sfhover.js[/URL]" charset="utf-8"></script>
    <script type="text/javascript" src="[URL="http://forums.macrumors.com/view-source:http://www.ktlw.org/_includes/jquery-1.3.2.min.js"]http://www.ktlw.org/_includes/jquery-1.3.2.min.js[/URL]" charset="utf-8"></script>
    <script type="text/javascript" src="[URL="http://forums.macrumors.com/view-source:http://www.ktlw.org/_includes/jquery.dataTables.min.js"]http://www.ktlw.org/_includes/jquery.dataTables.min.js[/URL]" charset="utf-8"></script>
    
    Should be:

    Code:
    <script type="text/javascript" src="[URL="http://forums.macrumors.com/view-source:http://www.ktlw.org/_includes/jquery-1.3.2.min.js"]http://www.ktlw.org/_includes/jquery-1.3.2.min.js[/URL]" charset="utf-8"></script>
    <script type="text/javascript" src="[URL="http://forums.macrumors.com/view-source:http://www.ktlw.org/_includes/sfhover.js"]http://www.ktlw.org/_includes/sfhover.js[/URL]" charset="utf-8"></script>
    <script type="text/javascript" src="[URL="http://forums.macrumors.com/view-source:http://www.ktlw.org/_includes/jquery.dataTables.min.js"]http://www.ktlw.org/_includes/jquery.dataTables.min.js[/URL]" charset="utf-8"></script>
    
    I base this on the fact sfHover invokes JQuery which hadn't loaded by the time you called it.

    -jim
     

Share This Page