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

  • Home
  • SEARCH
  • 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 8304529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:52:21+00:00 2026-06-08T17:52:21+00:00

Ok, so I understand what AJAX is. However, my problem is understanding what is

  • 0

Ok, so I understand what AJAX is. However, my problem is understanding what is required for it to run. For example, I have written three files that do a simple load a file when a button is pressed. Although this is not exactly AJAX with the whole XMLHTTP Request code (maybe I’m confused and this isn’t AJAX at all), it doesn’t work. My first question is what am I missing? Second, I read about how AJAX requires for the files to be in another server for it to work. Can anyone point to an article, tutorial, or even an explanation about this.

First File Code (This contains the button)

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">      
</head>

<body>
<input type="button" value="load" />
<div id="content"></div>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="ajax.js" >
</script>
</body>
</html>

Second file that contains the file that I want to load when the button is pressed.

<strong>This has been loaded into another page!</strong>

Third file contains the sudo-AJAX call.

$('#button').click(function () {
$('#content').load('test_ajax_return.php'); 
    });
  • 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-08T17:52:22+00:00Added an answer on June 8, 2026 at 5:52 pm

    You are using id button for your click but it doesnt have the id “button”, give your button an id and change it in the click event handler.

    <input type="button" value="load" id="loadButton" />
    $('#loadButton').click(function () { 
    
    
        $('#content').load('test_ajax_return.php'); 
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF service in an ASP.NET AJAX app that is returning json.
I have recently implemented Django's excellent cache framework. However from what I understand Django
I have a script that uses jQuery to POST data through AJAX to a
I understand that are similar question on StackOverflow about this problem, but none of
Can jquery-ajax reload a div WITH DYNAMIC CONTENTS. For example if i have a
i have an unusual javascript problem, i have a javascript problem that alternately refuses
We have an ajax navigation menu which updates a dynamic include. The include files
I was trying to understand how ajax works with django several times, but looks
I am trying to understand how Django + Jquery and Ajax calls work together.
What advantages does forge.ajax has over plain old jQuery.ajax or backbone.save() calls? I understand

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.