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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:19:46+00:00 2026-05-24T10:19:46+00:00

So i am using ajax jquery .load() function to retrieve books using their ISBN

  • 0

So i am using ajax jquery .load() function to retrieve books using their ISBN the id in a jquery dialog. I am trying to return the value to a input box on the page the dialog is being opened on with no luck. When i click the links, nothing happens. Below is my jquery code.

      <script type="text/javascript">
$(document).ready(function(){

     // dialog init
    $('.choosebookbox').dialog({
        autoOpen: false,
        resizable: false,
        modal: true,
        width: 600,
        height:600,
        title: 'Choose a book',
        overlay: { backgroundColor: "#000", opacity: 0.5 }
    });
    // click event
     $('a#booksearch_lnk').click(function(){
            $('.choosebookbox').dialog('open').css('display','block');
                $('#tab2').load('post/topsellers.php');
                $('#tab1').load('post/newbooks.php');

                 $('a.choosebook').click(function(){
                    // alert($(this).attr('id'));
                    $("#isbn").val($(this).attr('id'));
                    $('.choosebookbox').dialog("close");
                });
        });
});
    </script>

and a sample book link that appears in the modal/dialog…

<a id="0439064864" class="choosebook" href="#">Harry Potter and the Chamber of Secrets (Book 2)</a>
  • 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-24T10:19:47+00:00Added an answer on May 24, 2026 at 10:19 am

    A guess is that your links are loaded with your ajax and so do not belong to the DOM initially. In this case try the live
    function.

    $('a.choosebook').live("click", function() {
      //do stuff
    });
    

    Did your commented out alert display anything?

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

Sidebar

Related Questions

I am trying to make AJAX calls using the jQuery .load() method. When the
I'm currently trying to build a filter search function using JQuery and Ajax. The
I'm using jQuery's ajax methods to interact with the Twitter REST API . Their
I am using the $.ajax function in jquery to make a call to an
I'm using a jQuery ajax json call to retrieve a 3 dimensional PHP array
I'm using jquery ajax to post updates back to my server. I'm concerned about
I'm having difficulty parsing some JSON data returned from my server using jQuery.ajax() To
When using jQuery 's ajax method to submit form data, what is the best
I am using jQuery and Ajax, and my Ajax.php file returns the following field
I am using jQuery and Ajax. My MainFile has the following code: <html> <head>

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.