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 34767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:07:49+00:00 2026-05-10T14:07:49+00:00

I am working with both amq.js (ActiveMQ) and Google Maps . I load my

  • 0

I am working with both amq.js (ActiveMQ) and Google Maps. I load my scripts in this order

<head>     <meta http-equiv='content-type' content='text/html;charset=UTF-8' />     <title>AMQ & Maps Demo</title>      <!-- Stylesheet -->     <link rel='stylesheet' type='text/css' href='style.css'></link>      <!-- Google APIs -->     <script type='text/javascript' src='http://www.google.com/jsapi?key=abcdefg'></script>      <!-- Active MQ -->     <script type='text/javascript' src='amq/amq.js'></script>     <script type='text/javascript'>amq.uri='amq';</script>      <!-- Application -->     <script type='text/javascript' src='application.js'></script> </head> 

However in my application.js it loads Maps fine but I get an error when trying to subscribe to a Topic with AMQ. AMQ depends on prototype which the error console in Firefox says object is not defined. I think I have a problem with using the amq object before the script is finished loading. Is there a way to make sure both scripts load before I use them in my application.js?

Google has this nice function call google.setOnLoadCallback(initialize); which works great. I’m not sure amq.js has something like this.

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-10T14:07:49+00:00Added an answer on May 10, 2026 at 2:07 pm

    Is there a way to make sure both scripts load before I use them in my application.js?

    JavaScript files should load sequentially and block so unless the scripts you are depending on are doing something unusual all you should need to do is load application.js after the other files.

    Non-blocking JavaScript Downloads has some information about how scripts load (and discusses some techniques to subvert the blocking).

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

Sidebar

Related Questions

can get both working individually, but am unable to get them working together. this
These 2 ways of working both work, but I'm wondering if there's a difference
A co-worker and I are both working on the master branch at the moment.
Could someone tell if it's possible to get an OpenCL code working with both
I'm working with backbone and lazy-loading both templates and data for one of my
I'm working with strings that contain both digits and alphanumerics, or just digits, but
I am working with NSScanner to parse data that is both comma and line
I'm currently working on a solution which needs to use both Silverlight 3.0 and
I'm working on C++ project that is supposed to run on both Win32 and
I'm working on a php site that needs both Japanese and English. In most

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.