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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:55:33+00:00 2026-05-16T06:55:33+00:00

After calling the server and turning the data it returns into a table. I

  • 0

After calling the server and turning the data it returns into a table. I insert it into the page using jQuery’s .html() syntax. After that the data appears in the page but I can’t manipulate it using jQuery.

heres the code:

<html>
<head>
    <title>testJavaScript</title>

    <script type="text/javascript" src="jquery-1.4.2.js"></script>

    <script type="text/javascript">

    function makeTable(data) {

        var htmlOut = "<table id=\"AjaxTable\">";

        for (x in data) {
            htmlOut += "<tr>";
            for (y in data[x]) {
                htmlOut += "<td>"+data[x][y]+"</td>";
            }
            htmlOut += "</tr>";
        }

        htmlOut += "</table>";

        return htmlOut;
    }

    function getValue() {
        return $("#MyText").val()
    }

    $(document).ready(function () {

        $("img").hover(function () { //This dosent work on the data returned from the server
            $(this).hide(1000)
            //$(this).css({'background-color': '#357EC7', 'border': '2px solid #2B60DE'});
        })

        $("#populateDrop").click(function () {
            $.getJSON('http://127.0.0.1:5000/ajaxTest/json?num='+ getValue() +'&callback=?', function(data) {
                $(".result").html(makeTable(data.data));
            })

        })
    })
    </script>
</head>

<body>
    <img src="http://www.sharejs.com/code/windows/light-window/gallery/1-nature.jpg" width="50" height="50" /></br>
    <form>
    <input id="MyText" type="text" value="15" />
    </form>
    <a href="#" id="populateDrop">Populate!</a></br>
    <div class="result"></div>
</body>

  • 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-16T06:55:33+00:00Added an answer on May 16, 2026 at 6:55 am

    You need to use live instead for dynamic data:

    $("img").live('hover', function () {
     $(this).hide(1000);
    });
    

    More Info:

    • http://api.jquery.com/live/
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to insert data into MS SQL server 2008 using Ole DB.
I'm importing Oracle data into SQL Server. After my OLE DB Source that runs
I am using SQL Server database and after calling a simple SQL script I
i am calling ajax every second in page.. Here the server page returns randomly
After calling notifydatasetchanged(); I want to scroll to the bottom of list so that
I would like to know if after calling functions the data I have in
I'm loading some picture from server by JS after whole page is loaded. Means
In SQL Server 2008, I have a strongly typed data set with a table:
I have a column in SQL Server which is blank (empty string). After calling
After calling the following code, getResponseCode() returns the response code returned by the remote

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.