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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:37:58+00:00 2026-06-07T19:37:58+00:00

I have a querystring which looks like this page3.html?redesigndata=value which it appears if its

  • 0

I have a querystring which looks like this page3.html?redesigndata=value which it appears if its redirected from page1.html and page3.html?new=yes or no when redirected from page2.html. Here is the code I’m using to find out what the querystring is and do some functions on page3.html

var locurl = window.location.search;
if (locurl.substring(0, 13) === '?redesigndata') {
  alert("redesign!");
} else if (locurl.substring(0, 4) === '?new') {
  visit = locurl.substring(5);
  alert("somthing!");
  if (visit === 'yes') {
     alert("first!");
  } else if (visit === 'no') {
    alert("again!");
  }
}

but I don’t get any alerts when I try this script and I cant find out what’s wrong with it.

  • 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-07T19:38:01+00:00Added an answer on June 7, 2026 at 7:38 pm

    Try using this function

    function getQueryString() {
      var result = {}, queryString = location.search.substring(1),
          re = /([^&=]+)=([^&]*)/g, m;
    
      while (m = re.exec(queryString)) {
        result[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
      }
    
      return result;
    }
    
    // ...
    var myParam = getQueryString()["myParam"];
    

    Check like this

    if(getQueryString()["redesigndata"] != "")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dropdownlist that looks like this: @Html.DropDownListFor( x => x.Attribute.AttributeID, new SelectList(Model.Attributes,
I have a database connection which takes an input from the querystring to access
So, I have a page that looks like the following: alt text http://img704.imageshack.us/img704/5973/croppercapture3.png This
Here's an interesting problem: I have some jQuery that looks like this: $(document).ready(function() {
I have a controller method that looks like this: [AcceptGet] public ActionResult Index(SecurityMatrixIndexViewModel model)
I have a controller method in ASP.NET MVC that looks like this: public ActionResult
I have a form with a multiselect field with several options, which looks like
I have web page which is passing a querystring parameter to page 2: <a
I have startdate in QueryString with value: 3/1/2012 DateTime.Parse(Request.QueryString[startdate]).Month return month number: 1 but
how can i use request.querystring in asp.net.i have a linkbutton and this is in

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.