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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:58:00+00:00 2026-05-26T12:58:00+00:00

While requesting a php page from the server using .load() api, or for that

  • 0

While requesting a php page from the server using .load() api, or for that matter the .ajax() api of jquery, should the php page be a complete one with all the tags and markings, and also the should it have the database connection details in it?

I tried linking the php page using .load() but it does not seem to work. My php page that is being requested would have lots of images and stuff in it. How do I have this php page displayed using the load() api?

thanks.

  • 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-26T12:58:00+00:00Added an answer on May 26, 2026 at 12:58 pm

    I believe that the best practice is to load the resource you want to update dynamically,i.e. only load a partial page.

    When loading full pages, it’s likely that you’re loading a lot of data that you don’t need.

    Instead, I’d make a block with the html/images/script that you want to update dynamically, and just load this.

    Example

    Main page

    <html>
      <body>
        <h1>About me</h1>
        <p>Some data about me</p>
        <div class="latest-photos">&nbsp;</div>
      </body>
    </html>
    

    Gallery resource – gallery.block.php

    <ul>
      <li>
        <img src="myphoto1.jpg">
      </li>
      <li>
        <img src="myphoto2.jpg">
      </li>
    </ul>
    

    Script

    jQuery(function($){
      $(".latest-photos").load("gallery.block.php");
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am requesting with AJAX (using jQuery) a tag which contains a Javascript function
I am trying to use Google Translate REST API and while requesting the following
I'm requesting data from my server and receive a string in the form of
var hasData = '1'; while (hasData != 0) { $.ajax({ url: '/ajax.php?updateRow='+hasData, dataType: 'json',
I'm building a web app that uses ajax to communicate with the server. Basically,
While going through university and from following the development of SO, I've heard a
While in the final throws of upgrading MS-SQL Server 2005 Express Edition to MS-SQL
While I grew up using MSWindows, I transitioned to my much-loved Mac years ago.
here's the problem: when requesting url like - http://server/path/to/file.html?param=../../something/something i get response: 500 Internal
For example, when I want to update a part of my page with AJAX

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.