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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:21:45+00:00 2026-06-13T07:21:45+00:00

I have been searching for solutions and trying fixes for days now but with

  • 0

I have been searching for solutions and trying fixes for days now but with no change.

The boss man is on a Mac and I do not have one so I am having him try repeated fixes and relaying the output to me. So far no luck.

The current setup is thus, I have a form with username and password inputs which is submitted after it goes through validation. The validation is an ajax call which validates the username and password then submits the form.

Only on Mac Chrome and Safari (webkit) I get an error response from the ajax call which is blank.

I have stripped the php function that does the validation to simply echo “hello” so that I know it is not the php that is causing the problem.

So once the target element is clicked I grab the username and password values and send the ajax request. (which should hit my php file and just echo hello). However instead it returns and error with no message. What I mean by that is the xhr responseText and thrownError are all just blank/null.

so here is the code: (HTML)

<form id="signin_form" method="POST" action="index.php?cmd=Signin">
        <table id="welcomeSignin">
            <tr>
            <td>
                    <div class="welcome"><span class="signin-title-text f-xxlarge-or-link-goth">Welcome Back!</span></div>
                    <div id="error_msg"></div>
                    <table id="input_field_table">
                        <tr>
                                <td class="input-field-cell">
                                    <div class="singin-titles f-medium-gr-bold">Username</div>
                                </td>
                                <td class="input-field-cell">
                                    <div class="signin-inputs"><input class="signin styled" type="text" name="user_name"></div>
                                </td>
                        </tr>
                        <tr>
                            <td class="input-field-cell">
                                <div class="singin-titles f-medium-gr-bold">Password</div>
                            </td>
                            <td class="input-field-cell">
                                <div class="signin-inputs"><input class="signin styled" type="password" name="user_pass"></div>
                                <div class="forgot"><a href="" class="forgot-password f-small-or-link">Forgot your password?</a></div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <input type="hidden" name="post_type" value="signin">
                                <span id="create"><span class="f-medium">Don't have an account? <a href="" class="create"><span class="f-medium-or-link">click here</span></a></span></span> &nbsp;
                                <span class="active-login"><input type="checkbox" class="signin-radio" name="active_login"> <span class="f-medium"> Keep me signed in</span></span>
                                <div id="sign_in"><span class="signin-submit-button"><img src="../images/ready-create-icon.png"></span> <span class="signin-submit-text f-xxxlarge-gr-title-link">Sign In!</span></div>
                            </td>
                       </tr>
                    </table>
                </td>
            </tr>
    </table>

Nothing special there. Here is the jquery piece:

$('#sign_in').click(function(){
    var url = window.location.href;
    $('#error_msg').html('');
    var username = $('input[name="user_name"]').val();
    var password = $('input[name="user_pass"]').val();
    var err = '';
    $.ajax({
        url: ajaxUrl+'validate_signin',
        type: 'GET',
        cache: false,
        data: { username: encodeURIComponent(username), password: encodeURIComponent(password)},
        success: function(data, status, xhr){
            if(data !== 'OK'){
                err = data;
                $('#error_msg').html(err);
                return false;
            }else{
                $('#signin_form').submit();
                return false;
            }
        },
        error: function(xhr, ajaxOptions, thrownError){
            var tmp_err = "";
            tmp_err = ":: "+xhr.responseText+" :: "+xhr.responseXML+" :: ";
            alert(tmp_err);
            alert(xhr.responseText);
            alert(thrownError);
            window.location.href = url;
            }
        });
        return false;
});

the php file is just: echo “hello”; exit; just to avoid any errors for testing.

A few things here, I added the encodeURIComponent() because I did see a post describing a problem with special characters and white space.(didn’t work) on success: I included the status and xhr vars just for debugging normally I just have data.

Now in error: this is what is coming up each time however all responses are blank, or undefined. I was hoping to get some kind of decent error but I get nothing. Now this is only on a Mac recently upgraded to Mountian Lion and only on Webkit (Chrome/Safari) browsers.

I tried doing just XMLHttpRequest without using jQuery and I get the same thing.

This works in IE, Firefox, Chrome and Safari on a PC, it also works in FireFox on his Mac.

Finally this was working for him previously, I believe before his upgrade.

Any help would be great. I am pulling my hair out, I am greener on jQuery than php so hopefully one of you can help me out.

  • 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-13T07:21:47+00:00Added an answer on June 13, 2026 at 7:21 am

    This was a configuration issue. The problem occurred if the domain was entered without the leading www. on the domain name.

    Adding header(‘Access-Control-Allow-Origin: *’); to the php file solves this. You can specify specific domains to allow or use *.

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

Sidebar

Related Questions

I have been searching for an answer and trying out stuff for days now
I have been searching for quite a bit now but I have never been
I need some help. I have been searching for days trying to find solution
Have been searching how to convert a dictionary to a string. But the results
I have been searching several days for an example of how to make a
I have been searching for and have not located (I fear it doesn't exist)
I have been searching online for awhile, trying to find the best way to
I have been searching around for ages trying to find a solution to my
I have been searching for a solution to this and so far found nothing
I have been searching for a command that will return files from the current

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.