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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:16:10+00:00 2026-06-02T23:16:10+00:00

I am very new to jQuery, and I am probably doing this wrong, but

  • 0

I am very new to jQuery, and I am probably doing this wrong, but here is my problem. I have a page where a user puts input into boxes and hits submit, where response data will be generated on the server and sent back with AJAX. However, nothing happens when I press submit… I know the function is being called, so I think my jQuery code is wrong.

Here is my code, simplified:

<html>
<head>
<style type="text/css">
#hide {
    display:none;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
    $("#submit").click(doAjax());
});
function doAjax() {
    $.ajax({
        type:"GET",
        data:"myquerystring",
        url:"dummy.php"
    }).done(function(data){
        $("#hide").css("display","inline");
        $("#result").html(data);
    });
}
</script>
</head>
<body>
<p>Enter your text:</p>
<!--Code for textboxes-->
<button id="submit">Submit</button>
<p id="hide">Result:<pre id="result"></pre></p>
</body>
</html>

Right now, dummy.php is just:

<?php
echo "hi";
?>

so that’s not the problem. Can anyone help me with this?

UPDATE: Chrome tells me:

 Uncaught TypeError: Object #<XMLHttpRequest> has no method 'done'

when i try to run doAjax()

  • 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-02T23:16:12+00:00Added an answer on June 2, 2026 at 11:16 pm

    It is working on my test. Make sure your jquery is version 1.5+ http://api.jquery.com/deferred.done/

    Jquery 1.5

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

Sidebar

Related Questions

Im very new to all coding including jquery. I though this would have been
This is probably VERY simple and silly, but I am trying to use jQuery
im very new to jquery/javascript. So here goes, I found this js code for
hai i am very new to jquery and jqgrid.. i have implemented a grid...but
I'm very new to jQuery but keen to learn. Because of this I'm using
I'm new to JQuery, so this is probably a very dumb question. I've used
Guys i am very new to jQuery. I have started using the auto complete
hi am new to the jQuery lib and so far very cool i have
I'm very new to jquery and programming in general but I'm still trying to
I'm very new to JQuery, but I was told the one of the cool

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.