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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:21:49+00:00 2026-05-25T23:21:49+00:00

I have a login form from which the user enters user name and password.

  • 0

I have a login form from which the user enters user name and password. When they click on an image button to submit I do an ajax call to validate the user. The response returns a destination url. Now when I try to do a “window.location.href = url” the process doesnt work in FireFox 7(FF) but It does work on other browsers IE, Chrome… etc

Here is my jquery ajax call.

var loginSubmit = function () {

    if ($('#loginForm').data('isSubmitting')) return false;

        showProgress('Logging in..');
        $('#loginErrors').empty();
        $('#login-form').fadeTo(100, 0.4);
        $.ajax({
           cache: false,
           url: '/dispatcher/user/login',
           data: {
               'user': $('#userName').val(),
               'pwd': $('#password').val(),
               'continuePath': $('#continuePath').length > 0 ? $('#continuePath').val() : '/my-account'
           },
           type: 'POST',
           success: function (data) {  
            $('#loginForm').data('isSubmitting', true);

            console.log("Data from Controller: " + data.dest);

            if (data.dest) {
                var href = data.dest;
                window.location.href = href;
                return false;
            } else {
                console.log("DATA DEST FALSE");
                $('#loginForm').data('isSubmitting', false);
                $('#login-form').fadeTo(100, 1);
                showError('Invalid username/password');
            }
           }
        });
       return false;
    };
    $('#loginForm').submit(loginSubmit);

Here is my form.

    <form id="loginForm" action="#">
        <c:if test="${sessionScope['continuePath'] != null}">
            <input type="hidden" name="continuePath" value="${sessionScope['continuePath']}"/>
        </c:if>
        <div id="progressMessage" style="color: #333; font-weight: bold;"></div>
        <div id="loginErrors" style="color: red; font-weight: bold"></div>
        <div id="login-form">
            <dl>
                <dt><label for="userName">Email Address:</label></dt>
                <dd><input name="user" id="userName" type="text" size="30" maxlength="80"/></dd>
                <dt><label for="password">Password:</label></dt>
                <dd><input name="pwd" id="password" type="password" /></dd>
            </dl>
            <div class="login_button">
                <input type="image" src="/assets/images/user/btn-log-in.gif" alt="Login"/>
                <br/><br/>
                <a href="javascript:openPopup('forgotPassword');" class="default">Forgot your password?</a>
                <!--
                <a href="#" rel="#forgotPasswordDialog" class="default">Forgot your password?</a>
                -->
            </div>
        </div>
    </form>

Why is this behavior different in FireFox 7? Can someone suggest a work around that will work in all browsers? Can you sense my frustration?

  • 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-25T23:21:50+00:00Added an answer on May 25, 2026 at 11:21 pm

    What about:

    window.location = url; //no .href
    

    Edit based on comment.

    Since your url is relative to your site root, the “most correct” part of the window.location object to use would be pathname, as that describes the path relative to the host.

    window.location.pathname = "/my/relative/path/page.html";
    

    However, any change to the window.location object should trigger the window.location.assign() method and load a new page. If that event is not triggering when you modify the object properties, you can always try calling it directly.

    window.location.assign(href);
    

    Finally, I was checking via the console and unable to reproduce this behavior with FF7. window.location worked with relative paths and full urls.

    further reference: https://developer.mozilla.org/en/window.location

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a login form that has Username and password as inputs from user
I have a simple login form, username and password. Basically, When a user is
I have Ext.tab.Panel with few items. One item is login panel of type Ext.form.Panel.From
I have a login form which appears at the top of all of my
I have a login form, which needs to be re-directed to the main page
Possible Duplicate: Checking for an SQL result in VB.NET I have login form which
i have a login form, which is in login.php. after authorization i moove client
On my website I have a PHP script which (when user enters a username
I have a login page which the user logs in with a username and
I have a login form where the user can login only with the valid

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.