Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6248313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:02:02+00:00 2026-05-24T13:02:02+00:00

http://dl.dropbox.com/u/331982/Sandbox/comsat.html <– code http://dl.dropbox.com/u/331982/Sandbox/comsat.js <– location of javascript file So, This worked when I

  • 0

http://dl.dropbox.com/u/331982/Sandbox/comsat.html <– code

http://dl.dropbox.com/u/331982/Sandbox/comsat.js <– location of javascript file

So, This worked when I had everything all in one file, but I’m not a huge fan of having giant script tags in my HTML.

I get the error that one of the Raphael methods is undefined…. =\

How do I load my script correctly?

Everything is loaded in the <head>

<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Comsat</title>

    <script type="text/javascript" src="http://dl.dropbox.com/u/331982/Sandbox/raphael-min.js"></script> 
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
    <script type="text/javascript" src="http://dl.dropbox.com/u/331982/Sandbox/comsat.js"></script> 


  <style type="text/css">
    body{
    background: url(http://i.imgur.com/Ks6Pd.jpg);
}
  </style>

</head>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:02:03+00:00Added an answer on May 24, 2026 at 1:02 pm

    It looks to me like the error is that initPlayerSelect() is not defined and I think that’s because that function is not in the global scope, but rather it’s defined inside another function scope and thus is not reachable from initComSat().

    You will need to make it so that initPlayerSelect() can be reached from inside the initComSat() function.

    One way to do that is to move the initPlayerSelect() code out of the block it’s in and put it right before initComSat().

    FYI, this particular error has nothing to do with using JS files or any order of JS files – it’s purely a function scoping issue.

    The next error I see is caused because you are running jQuery DOM access code before the page has been loaded here in comsat.js:

    /*
        DOM Containers
    */
    var cs_playerList = [];
    var cs_players = $("ul.players");
    // End DOM Containers
    

    This code fails at script load time, which causes cs_players to be null or undefined which later causes initPlayerSelect() to fail.

    Code like that can’t be run until the page has been loaded. jQuery has $(document).ready() to run code when the page is loaded.;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my site: http://dl.dropbox.com/u/331982/Sandbox/comsat.html To get the items to appear that are messing
http://developer.yahoo.com/javascript/howto-proxy.html Are there disadvantages to this technique? The advantage is obvious, that you can
I've uploaded a test file here: http://dl.dropbox.com/u/2201804/IE8test.html If you click on the Click me
I want to create a search bar like one in this page http://dl.dropbox.com/u/333492/search/form.html If
Try this link on Firefox or Chrome: http://dl.dropbox.com/u/34375299/aaa/index.html Notice a simple animation appears on
I have this XML file : http://dl.dropbox.com/u/10773282/2011/perf.xml It has two Class elements as is
When viewing this url http://dl.dropbox.com/u/1550420/jquery/flickr.html , we see a list of images pulling from
I have received the following video file from a camera (from security camera) http://dl.dropbox.com/u/1369478/tmw/recording.264
I've an issue with the Ubercart cart layout in Drupal. See this image: http://dl.dropbox.com/u/72686/cart.png
I have the following button: http://dl.dropbox.com/u/3564087/button.png However this image has a blank area on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.