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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:48:32+00:00 2026-05-22T01:48:32+00:00

Ok fixed jQuery code with help of others on stack overflow $(document).ready(function() { $(.note).live(‘click’,function()

  • 0

Ok fixed jQuery code with help of others on stack overflow

$(document).ready(function() {

   $(".note").live('click',function() {
      $("#note_utm_con").show();
      $("#note_utm_nt").html("<img src='http://www.ajaxload.info/images/exemples/4.gif' />");

      $.ajax({
         type: "GET",
         url: "view.php",
         data: "ajax=1&nid=' + parent.attr('id').replace('record-','')",
         success: function(html){
            $("#note_utm").html(html);
            $("#note_utm_nt").html("");
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
            $("#note_utm_nt").html("<img src='http://www.ajaxload.info/images/exemples/4.gif' /> Error...");
        }
      });
   });
});

The PHP code for view.php

include 'object/db.class.php';

if($_GET['ajax'] == '1') {

#make a call to my sql to fetch some sort of ID

         $nid = $_GET['nid'];

         $q = mysql_query("SELECT * FROM `notice` WHERE nid = '".$nid."'");
         $a = mysql_fetch_array($q);

             $nid = stripslashes($a['nid']);
             $note = stripslashes($a['note']);
             $type = stripslashes($a['type']);
             $private = stripslashes($a['private']);
             $date = stripslashes($a['date']);
             $author = stripslashes($a['author']);

         $note_viewer .= <<<NOTE_VIEWER

         <h2>By: $author</h2> - <h2>$date</h2>
         <br/>
         <p>$note</p>
         <p>Request: $private</p>

NOTE_VIEWER;

             echo $note_viewer;


}

The AJAX seems to be working now as it gives me Error…

  • 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-22T01:48:33+00:00Added an answer on May 22, 2026 at 1:48 am

    concerning the docu of jQuery, you attach an event with the live() method. In your code, you define the click-method of node twice, I think: once with the live-attaching-stuff and once with note.click(). So it is not clear what to do when clicking or better when node is clicked, the click-event is defined 🙂 You define two different actions when note is clicked… try this one:

    $(document).ready(function() {
    
       $(".note").live('click',function() {
          $("#note_utm_con").show();
          $("#note_utm_nt").html("<img src='http://www.ajaxload.info/images/exemples/4.gif' />");
    
          $.ajax({
             type: "GET",
             url: "view.php",
             data: "ajax=1&nid=' + parent.attr('id').replace('record-',''),
             success: function(html){
                $("#note_utm").html(html);
                $("#note_utm_nt").html("");
             }
          });
       });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this code // jquery $(document).ready(function() { $('#update_point').live(change, function() { var point_val =
I'm having issues with my jQuery code. When I click the button everything within
Edit: This is a confirmed bug in jQuery 1.3.1. It is fixed in jQuery
How do you compare a value from jQuery with a fixed number? I thought
So I built some complex ajaxy jquery module on my homepage, with the help
Below is the jQuery code I am attempting to use. It works well in
I have this snippet of code (AJAX) in jQuery. $.get('someScript.php?lat=' + clickedLatLng.lat() + '&lon='
I need some jQuery ajax help. I currently have a main content div that
Fairly new to asp.net Mvc and jquery. Have the following code working fine, but
I recently tried to use jQuery's effect('scale') function with the hover() function in jQuery.

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.