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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:52:01+00:00 2026-05-25T13:52:01+00:00

I am just learning AJAX, and the following HTML file is not working. Every

  • 0

I am just learning AJAX, and the following HTML file is not working. Every time I release a key, firebug says “login is not a function”. I can’t figure out why this is. Any help is appreciated.

<html>
<head>
<title>Ajax</title>
<script type="text/javascript">
function makeAjax() {
    var ajax;
    try{
        ajax = new XMLHttpRequest();
    }
    catch (e) {
        try {
            ajax = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e) {
            try {
                ajax = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (e) {
                alert("Your browser is either OLD or BAD! UPDATE!");
                return false;
            }
        }
    }
    ajax.onreadystatechange = function() {
        if(ajax.readyState == 4 && ajax.status == 200) {
            document.getElementById("btag").innerHTML = ajax.responseText;
        }
    }
}
function login() {
    ajax.open("GET", "ajax.php", true);
    ajax.send(null); 
}
</script>
</head>
<body onLoad="makeAjax();">
<form name="login">
Username: <input type="text" onKeyUp="login();" />
<br /><br />
Password: <input type="password" onKeyUp="login();" />
<b id="btag"></b>
</form>
</body>
</html>
  • 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-25T13:52:01+00:00Added an answer on May 25, 2026 at 1:52 pm

    onKeyUp="login();" seems to be finding your form (also named login). Renaming the form to something different (e.g. login_form) works for me.

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

Sidebar

Related Questions

I've just starting learning jQuery and AJAX. I'm able to load a local page
I'm just learning how to utilise ajax/json with jquery and I've hit a brick
I just started learning ajax and I just can't get the concept of the
I am have a hard time learning how to use ajax and jquery to
I just started learning AJAX and Yiiframework. What are the steps to create AJAX
I just started learning using AJAX with Codeigniter. On my view, I have a
I am a newbie on web development, just started learning ajax request and dynamic
Just starting learning about ajax requests using jQuery. I've tried looking at other posts
Just for fun, learning, aesthetics, etc. I've been using Ajax to modify my Tumblr
Just learning Silverlight 4/RIA and i 'm stuck in a weird problem: setup an

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.