Web Analytics Made Easy -
StatCounter Calling more than one javascript include on a page? Please help? - CodingForum


No announcement yet.

Calling more than one javascript include on a page? Please help?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Calling more than one javascript include on a page? Please help?

    I am so stuck! No matter what I do, Internet Explorer (Firefox and others display them all) will only display 10 javascript includes on my page. I have been searching the web for 6 days and nothing I've found works for me. Can someone PLEASE help?

    The page is at http://www.gracofish.com/new/locations.php

    I am attaching the page code as a txt file (it says the code is too long to post and won't allow php files)

    As you can see, it's a map and the location stars display a popup when you place your mouse over them. Each star is called like:

    <script type="text/javascript" language="JavaScript1.2" src="java/glendive.js"></script>

    There are 14 stars and each .js file has a unique name. There is also another file they all use called stm31.js which is called in the head tag like this:

    <script type="text/javascript" language="JavaScript1.2" src="java/stm31.js"></script>

    I created them all in Sothink DHTML Menu. For some reason, IE will only display the first 10. Firefox displays all 14 just fine, but you all know how many people use IE, so I need to figure out how to make them all display in IE. If I delete 4 of them, they all display fine, but only 10 will display at a time, no matter which ones, just the first 10.

    Can someone please help me figure out how to get all 14 to display on the page? Any help would be GREATLY appreciated.

    Thanks everyone!
    Attached Files

  • #2
    Page Optimisation.


    Dont use PHP at all but if I was using ASP, I would migrate all the Javascript files into one HTML or ASP page, and use one virtual SSI, therefore optimising the page to use virtual relative commands, rather than wht you are doing.

    <!-- #include virtual="file path/Javascript.htm" -->

    within your page.

    <script src="file pathway" laguage="javascript" type="text/javascript" runat="client"></script>

    note the fact that your page will be a little more universal to older browsers if you do not specfiy to build of Javascript you are using, and because you are using a server side command, you wil ne to include the Runat command to specify wher you are running( even though the files are client side lanaguage, the file pathway is specified witha server side command, therefore will be parsed at the server.

    ty this one.

    By for now..



    • #3
      Thanks Kai. Is there any way you could show an example of how to combine all of those?


      • #4
        Can anyone help me with what Kai suggested, putting everything in one file? I've been trying to get it to work, and I understand how to combine all of the .js files into one, for the most part (I still need a ittle help with that), although he suggested using ssi includes and I'm not sure how to do that either, but I just don't know how to call each individual popup by calling it from one file. How to I specify which part of the file it needs to call so that it calls the correct image and popup? Could someone please show me a little more detailed example (maybe explain it like you're talking to a ten year-old LOL!)

        Or, if someone could fix it for me either using php and javascript or php and ssi includes, I would be happy to pay for it. While I'm really good at designing, coding scripts isn't one of my strong points. Help?

        Thanks again all!