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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:19:03+00:00 2026-05-31T10:19:03+00:00

the problem is that the redirect is not working, it should ignore a search

  • 0

the problem is that the redirect is not working, it should ignore a search page after login, but it is not. the user clicks on a button to reserve his book, if he is not logged in, a prompt box will ask him for the login information, after login, the user should be redirected to a request form. and now it is taking him to the search page that is defined in the action of the login form.

var cookieName = "activeRequest";
var variableName = "requestUrl";
var lifetime = 60;

$(document).ready(function() {
    "use strict";
    //$.Jookie.Initialise(cookieName,lifetime);  

    $(".public_request").click(function() {

        //alert("click");
        var url = $(this).attr("id");

        store(url);
        //alert(url);
        //return false;   
    });
});


//store the request link

function store(url) {
    "use strict";
    $.Jookie.Initialise(cookieName, lifetime);
    $.Jookie.Set(cookieName, variableName, url);


}
//check for a active request

function checkForRequest() {
    "use strict";
    $.Jookie.Initialise(cookieName, lifetime);
    var reqURL = $.Jookie.Get(cookieName, variableName);

    //check the response and see if there was one
    if (reqURL === undefined) {
        return false;
    }
    else {
        deleteCookie();
        redirect(reqURL);

    }
}

//redirect to request
function redirect(url) {
    "use strict";
    window.location = url;
}

//delete an active request after redirect
function deleteCookie() {
    "use strict";
    $.Jookie.Initialise(cookieName, lifetime);
    $.Jookie.Unset(cookieName, variableName);
}
  • 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-31T10:19:04+00:00Added an answer on May 31, 2026 at 10:19 am
    if(reqURL === undefined)
    

    should be

    if (typeof(reqURL) == "undefined")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

my problem is after i successfully log in,it is not redirect to page that
I experience strange problem. We have error handling in global.asax that would redirect user
My problem is that I want to redirect via JavaScript to a directory above.
I have a problem that I'm working on for quite some time now. I
Seems to be a problem that many people have, but all the answers I
I have a root_path on my Rails application that is not user-protected i.e. it's
My page is not redirecting as it should due to my .htaccess file which
I'm working on a simple CMS (based on Django, not that it matters) similar
I'm trying to redirect my old pages to new pages but this is not
I am trying to redirect to a new page using CakePHP redirect method but

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.