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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:15:30+00:00 2026-06-07T11:15:30+00:00

Is there a way to use the jQuery .load(page.php) function such I selectively pick

  • 0

Is there a way to use the jQuery .load(page.php) function such I selectively pick parts of page.php? For example, something like this:

$('#div1').load('page.php#1'); //Puts div id = 1 into div1
$('#div2').load('page.php#2'); //Puts div id = 2 into div2
...

My problem might make more sense if I explain the use case – I currently have a table with several cells that pull data from various php functions. This data changes over time, and so I want to dynamically reload that table.

There’s a catch though – the table elements also contain text input forms. If I reload the entire table, the user loses the data typed into the forms and the focus on the form. Even if I preserve those things by saving them in temporary variables, the cursor still resets to the beginning of the form. I’d much rather not create one page for every element of data, so I’m wondering if there’s a way I can select which parts of the page I’m loading.

  • 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-06-07T11:15:33+00:00Added an answer on June 7, 2026 at 11:15 am

    What’s wrong with $.get and using jQuery to parse/push the content where you want it?

    $.get('/my/page.html',function(data){
      $('#one').empty().append($('#one',data));
      $('#two').empty().append($('#two',data));
      // ...
    });
    

    Also, FWIW, an ID beginning with a numeric value is invalid. You need to start with a letter.

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

Sidebar

Related Questions

Is there a way to use autocomplete without JQuery UI cause JQuery UI's footprint
Is there a way to make jQuery use objects in a conditional statement as
Is there any way that I can use JavaScript (and jQuery) to create a
Is there a way to use jquery (or other method) to display a loading
The page having problems is... http://schnell.dreamhosters.com/index.php?page=gallery# I use Firebug to debug my jQuery and
I am building a dynamic partial load asp.net page, I would like to use
Is there a way to pass results generated within a PHP page (called into
In my php program I display input forms either regular way on page load
Is there a way to use PowerShell to view the contents of the GAC?
Is there a way to use the CompiledQuery.Compile method to compile the Expression associated

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.