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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:33:32+00:00 2026-06-09T04:33:32+00:00

I run the following JavaScript code which gives my the list of parameters from

  • 0

I run the following JavaScript code which gives my the list of parameters from the client as well as calling a Google fusion table SQL statement which supplies its response to the callback function handleResponse.

<script>

  // get parameter list
  var url = window.location.toString();
  url.match(/\?(.+)$/);
  var params = RegExp.$1;
  var params = params.split("&");
  var queryStringList = {};
  for(var i=0;i<params.length;i++)
  {
    var tmp = params[i].split("=");
    queryStringList[tmp[0]] = unescape(tmp[1]);
  }

  // callback function
  function handleRespose(response)
  {
  }
</script>
<script src="https://www.googleapis.com/fusiontables/v1/query?sql=SELECT data from table&key=myKey&callback=handleRespose"></script>

My question is, how can I use queryStringList like this:

<script src="https://www.googleapis.com/fusiontables/v1/query?sql=SELECT " + queryStringList["data1"] + "from table&key=myKey&callback=handleRespose"></script>
  • 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-06-09T04:33:34+00:00Added an answer on June 9, 2026 at 4:33 am

    You’ll have to load the new JS file from JavaScript. For example:

    var fusiontables = document.createElement("script");
    fusiontables.setAttribute("src", "https://www.googleapis.com/fusiontables/v1/query?sql=SELECT " + queryStringList["data1"] + "from table&key=myKey&callback=handleRespose");
    
    document.getElementsByTagName("head")[0].appendChild(fusiontables);
    

    This will programmatically create a new <script> element and inject it into the page. Note that the variable doesn’t need to be global to do this.

    If you put this in a function, you could use it like this:

    // loadscript.js
    function loadscript(url) {
        var script = document.createElement("script");
        script.setAttribute("src", url);
        document.getElementsByTagName("head")[0].appendChild(script);
    }
    
    <!-- page.html -->
    <script src="loadscript.js"></script>
    <script>
        var queryStringList = {};
        // ... Do stuff to fill queryStringList ...
    
        var url = "https://www.googleapis.com/fusiontables/v1/query?sql=SELECT " + queryStringList["data1"] + "from table&key=myKey&callback=handleRespose";
        loadscript(url);
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

when I trying to run following code. var result = from c in db.brand
I run the following code from command line: public class MemoryTest { public static
I have the following javascript code, which is doing an image rotation on a
Hi I have following JavaScript code that I am trying to run. My aim
I would like to use Google Translate TTS engine from my JavaScript code. It
Can not run following SQL from ant's sql task : BEGIN DBMS_AQADM.CREATE_QUEUE_TABLE( queue_table =>
I run the following code on a Windows platform. The purpose is the know
I run the following Gert's extract command to the data dump file which format
I have the following Code which I know doesn't work correctly. Yes I know
I need to fetch some result on a webpage, which use some JavaScript code

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.