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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:05:19+00:00 2026-05-28T01:05:19+00:00

I have to load multiple HTML parts in several divs with the class ‘result’

  • 0

I have to load multiple HTML parts in several divs with the class ‘result’ and a unique id.

$('.result').load('/check.php',
        {'id': this.id, 'url':'<?=$url?>'}
    );

A PHP script (check.php) will generate different HTML according to the parameters it gets (id & url). I want to pass this.id as a parameter, but the pages never get loaded.

this.id is a string right? If I replace this.id by say ‘hello’ it would work.

  • 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-28T01:05:20+00:00Added an answer on May 28, 2026 at 1:05 am

    If you’re expecting this.id to be the ID of each individual .result element as passed to .load, that won’t work. Your code doesn’t create a new context, so this will be whatever it was outside of the .load call.

    This should work:

    $('.result').each(function() {
        $(this).load('/check.php',
            {'id': this.id, 'url':'<?=$url?>'}
        );
    });
    

    because the .each call does set this to each of the selected elements, in turn.

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

Sidebar

Related Questions

i've this problem for days... I have to load from php the entire html
I have been working on a web page and would like to load multiple
I have a load of php templates which uses a custom translate function __,
I have multiple DIVs on my page and I'm having problems populating the correct
I have a multiple html tables on a page which each have a header
I have the following HTML: <select id=testMe name=test multiple=multiple size=5 style=width:270px> <option value=test1>test1</option> <option
I have a page that has multiple parts of the page loaded via ajax,
I have multiple html files which i saved in the assets folder. one of
Basically I want to load a HTML document and using controls such as multiple
This is very interesting.. I want to have multiple gridviews in a panel. and

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.