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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:29:58+00:00 2026-05-26T06:29:58+00:00

Users will be hitting up against a URL that contains a query string called

  • 0

Users will be hitting up against a URL that contains a query string called inquirytype. For a number of reasons, I need to read in this query string with javascript (Dojo) and save its value to a variable. I’ve done a fair amount of research trying to find how to do this, and I’ve discovered a few possibilities, but none of them seem to actually read in a query string that isn’t hard-coded somewhere in the 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-05-26T06:29:59+00:00Added an answer on May 26, 2026 at 6:29 am

    You can access parameters from the url using location.search without Dojo Can a javascript attribute value be determined by a manual url parameter?

    function getUrlParams() {
    
      var paramMap = {};
      if (location.search.length == 0) {
        return paramMap;
      }
      var parts = location.search.substring(1).split("&");
    
      for (var i = 0; i < parts.length; i ++) {
        var component = parts[i].split("=");
        paramMap [decodeURIComponent(component[0])] = decodeURIComponent(component[1]);
      }
      return paramMap;
    }
    

    Then you could do the following to extract id from the url /hello.php?id=5&name=value

    var params = getUrlParams();
    var id = params['id']; // or params.id
    

    Dojo provides http://dojotoolkit.org/reference-guide/dojo/queryToObject.html which is a bit smarter than my simple implementation and creates arrays out of duplicated keys.

    var uri = "http://some.server.org/somecontext/?foo=bar&foo=bar2&bit=byte";
    var query = uri.substring(uri.indexOf("?") + 1, uri.length);
    var queryObject = dojo.queryToObject(query);
    
    //The structure of queryObject will be:
    // {
    //   foo: ["bar", "bar2],
    //   bit: "byte"
    // }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to allow users to upload PDF documents that other users will read.
My users will import through cut and paste a large string that will contain
I am programming a website in which users will have a number of settings,
I'm creating an app that will have a fair amount of users. Everytime someone
Alright, currently I have my SWF hitting a php file that will go and
I'm writing a php script that will fetch data from a given URL and
I'm working on a web-based project that users will access after having been authenticated
What my users will do is select a PDF document on their machine, upload
I want to up the time my users will stay logged into my site
I am creating a component where registered users will be able to use the

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.