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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:22:29+00:00 2026-06-04T00:22:29+00:00

as in the title we’re firing $(‘#id’).load(‘someUrl’, function(){/*some stuff*/}); But it seems to be

  • 0

as in the title

we’re firing

$('#id').load('someUrl', function(){/*some stuff*/});

But it seems to be being passed to the login form because it’s not logged in?!

The user is logged in. Is this normal?

  • 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-04T00:22:31+00:00Added an answer on June 4, 2026 at 12:22 am

    This happened to me too, but the cause was not that ajax is going crazy – which it may look like – but that the URL was not correct.

    The website was initially hosted on localhost, without any alias, so I had a working URL like localhost/controller/action.

    Then I moved the website under an alias – so the website’s URL was localhost/alias. At this point, two strange things happaned to SOME ajax requests:
    – the requests were prompted for authentication (the website was using windows authentication)
    – the requests’ session was different than the one of the page which launched the request

    The problem was that some URLs were hardcoded in the js code. So we had code like “url: '/controller/action'” in the ajax calls code, and this URL didn’t take into consideration the alias under which the website was hosted in IIS.

    The solution was to declare a js variable in the page and assign it the URL built the right way, with Url.Action, and then use the variable in the ajax call:
    Page:

    <script type="text/javascript">
        var ajaxUrl = '@Url.Action("actionname", "controllername")';
    </script>
    

    Js file:

        $.ajax({
                        type: 'POST',
                        url: ajaxUrl,
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Title is quite self explanatory, but I have some animation being done in a
title seems clear enough, but we never know. here's my problem, i got a
Title said it all. Some context: I got a search mechanism - search view,
Title probably doesn't make a lot of sense, so I'll start with some code:
Title is a bit ambiguous, but what I mean is: InputStream is = connection.getInputStream();
Title pretty much explains most of my question. I will provide some context. I've
Title is pretty self-explanatory. I've got a DataGrid for a Windows Form Application, and
Title is self-explanatory. I have a good bit of experience with PHP, but I
Title has it. Just to have an idea, pointing to some good links with
Title is descriptive, what is wrong with this code and why? <script type=text/javascript> $(document).ready(function()

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.