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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:21:47+00:00 2026-05-26T18:21:47+00:00

Writing a jquery function to check whether password user enters is already in use.

  • 0

Writing a jquery function to check whether password user enters is already in use.
Using a blur event to send via post() value to a coldfusion page that returns ‘ok’ or false.
Using firebug, looks like am sending and receiving the expected data.

I’m guessing that perhaps my problem is in the return function. My first alert for resp gives correct. However, regardless the resp value (whether it is ‘ok’ or ‘notok’, I get the “else” option in the test.

Appreciate any thougts as what I wrong. (This is my first stackoverflow post, so hope I am doing this correctly!) Here is function that is called on the “ready”. As I said, the jquery blur and the post seem to be correctly functioning. (I also used get() with same result.)

function setAjaxCk() {
$('#password').blur(function(){
    var myVal = $('#password').val();
    if (myVal.length < 1){
        return false;   
    }
    $.post("ajxTest.cfm",{myWord: myVal, myType: 'pw'},
          function(resp) {
              alert(resp);
              if(resp == 'ok'){
                alert('things are alright');  
              } else {
                alert('a problem here');  
              }
    });
    return false;
}); 
}
  • 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-26T18:21:48+00:00Added an answer on May 26, 2026 at 6:21 pm

    What is the dataType of the post ? JSON i assume, can you try adding datatype = JSON in your jQuery.post and then re run your code ?

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

Sidebar

Related Questions

Im writing some logic in JavaScript using jquery, where i must check the input
What is the use of writing a jQuery function like so... $(function myFunction() {
I'm writing a jQuery function where I'd like to access both the native size
what tools do you use for writing jquery code and testing/debugging your code?
May be some body already used some open source component, writing on jquery. And
I am writing a function that well keep the user in lightbox images while
Ive been writing a simple jquery function that turns a div with a list
I'm writing a little jQuery extension that prevents a user from double clicking on
My first foray into writing jQuery functions. I have this function, but I'm not
I'm writing jQuery code where I need to check if link is an image.

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.