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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:25:14+00:00 2026-05-29T04:25:14+00:00

I make some script, that have modal window on fancybox and on load it’s

  • 0

I make some script, that have modal window on fancybox and on load it’s fills by some content from other files. And i have some quetions:

I want to load content via ajax to my container (#dialog-analogy). But not full page – only one div with id (#get-cats). I dont know, how to get a content of id from ajax page. Thi is draft script:

function FillCats(catid) {
    $.ajax({
        url: "catalogue.php?cat="+catid+"&size=1",
            cache: false,  
            success: function(html){  
                    var getcat = $('#get-cats').html(html); // wrong
            $("#dialog-analogy").html(getcat);
            }  
    });
}
  • 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-29T04:25:14+00:00Added an answer on May 29, 2026 at 4:25 am

    You’ll be glad to know that jQuery’s load function has exactly the functionality you want. You just append a selector to the end of the URL.

    function FillCats(catid) {
        $("#dialog-analogy").load("catalogue.php?cat="+catid+"&size=1 #get-cats");
    }
    

    See the Loading Page Fragments section of the load documentation.

    Live example using load


    If for some reason you can’t use load, you can emulate it easily by building up the structure of what you’ve received via $() and then extracting the element(s) you want:

    function FillCats(catid) {
        $.ajax({
            url: "catalogue.php?cat="+catid+"&size=1",
            cache: false,
            success: function(data) {
                $("#dialog-analogy").html($(data).find("#get-cats"));
            }
        });
    }
    

    Live example emulating load using ajax

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

Sidebar

Related Questions

I am developing a PHP script that has to make some calls to a
I have a modal window using jqmodal. I need a button within that modal
I have a Ruby script in my Rails app that I use to load
I'd like to make some custom MenuHeaders in WPF so I can have (for
I'm trying to make some types in Django that map to standard Django types.
I am using a SWFupload script and I can't make a request from flash
I have some PHP script for export MYSQL table into Excel format, but I
I have a complex MATLAB-Simulink project involving many m-files and mdl-files. Some m-files define
I have this code in some of my ASCX files: <%=Html.ActionLink(Resources.Localize.Routes_WidgetsEdit, Edit, Widget, new
I have a PHP script that needs to execute programmes that will work on

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.