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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:36:07+00:00 2026-05-27T08:36:07+00:00

I need to pass 2 URL parameters in a URL. The URL originates in

  • 0

I need to pass 2 URL parameters in a URL. The URL originates in an email and the user will click the link directing them to my site. The first parameter triggers a script on the page the second parameter is for a module my CMS will render from the parameter.

First Parameter is : message=1 (This parameter triggers the javascript)

The second Parameter is: name={tag_recipientfirstname} (My CMS will render the module)

The script that is called for the first looks like this:

    <script type="text/javascript">
var $j = jQuery.noConflict();
$j(document).ready(function() {
var url = window.location.href;
url = url.toLowerCase();
if (url.indexOf('message=1') != -1) {
        $j("a.message").colorbox({
            open:true
});
   }
$j("a.message").colorbox(); //not related to URL parameter
}); 
</script>

The second parameter is used on the page as:

<div>
<p>{ module_url,name} (again CMS will render this module)</p>
</div>

EDIT

I realize I left a couple things out:

First: How do I pass both parameters so they will both function as listed above?

And the CMS I am using is Business Catalyst.

  • 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-27T08:36:08+00:00Added an answer on May 27, 2026 at 8:36 am
    //split the `location.search` string at the ampersands
    var search_arr = window.location.search.replace('?', '').split('&'),
        len        = search_arr.length,
        get_vars   = {},
        tmp        = [];
    
    //iterate through the key/value pairs and add them to the `get_vars` object
    for (var i = 0; i < len; i++) {
        tmp = search_arr[i].split('=');
        get_vars[tmp[0]] = tmp[1];
    }
    
    //you can now access your GET variables through the `get_vars` object like: `get_vars.name`
    
    //you can check for the existence of a certain GET variable like this
    if (typeof(get_vars['message-1']) != 'undefined') {
        $j("a.message").colorbox({
            open:true
        });
    }
    

    Here is a demo:http://jsfiddle.net/aBH8K/1/ (http://jsfiddle.net/aBH8K/1/show/?message-1=3 to see with get var)

    Some related documentation:

    • window.location: https://developer.mozilla.org/en/DOM/window.location
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a situation where I need to pass some parameters on url.
I sometimes need to pass additional parameters to a page via the URL. I
I need to pass an url from asp.net load_page to flowplayer javascript function here:
I need to pass a couple bits of info through the URL just by
http://www.domainname.com/#changepassword I need to pass an extra variable with a URL like above. I've
I need to pass a url string from the view to the controller, a
I have an issue where I need to pass in query parameters for a
I need to change $config['uri_protocol'] from AUTO to PATH_INFO (to allow url parameters) My
Need to pass get parameter without value and without = symbol to utilize external
I need to pass multiple parameters dynamically to my ascx file through the image

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.