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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:26:58+00:00 2026-06-04T04:26:58+00:00

i am loading a php page inside a div that takes a posted variable

  • 0

i am loading a php page inside a div that takes a posted variable to display the proper content. it works using this:

$(".mainArea").load("page.php", {'folder': 'a'}).fadeIn(); 
//passes vars, but all my jquery event handlers no longer work

the problem is that after i dynamically load this content – i cant get my event handlers to work. so i thought the solution would be this:

$(".mainArea").on("load", "page.php", {'folder': 'a'}).fadeIn(); 
// all event handlers still work - but the variables do not get posted...

any ideas on how i can combine these two or get the later to actually pass variables?

  • 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-04T04:26:59+00:00Added an answer on June 4, 2026 at 4:26 am
    • .load loads data from the server from the specified URL and places the resulting content in the specified element.

    • The load event occurs when an element and its sub-elements have been completely loaded. This event is only available on certain types of elements.

    Basically, they do two completely different things (but they do have the same function name in jQuery so they are easily confused).

    As for your problem of event handlers being un-bound when you load new content in, you need to use event delegation using on:

    $("container_selector").on("event", "child-element-selector", function () {...});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to load content of my page inside a div element using this
I'm loading in some HTML content like this: $('#scores').load('scores.php #scores'); Note that It is
I have a Help page, help.php that I am loading inside an iframe in
After loading a PHP template (using jQuery's load function), this simple script won't make
I have page loading, via AJAX a PHP page into a div. In turn,
I'm building a PHP page that will load some off site content into a
Rigth now, I am using this function to load content from a different page
I have parent page index.php and inside it i have iframe like below <div
I have a WebView into which I'm loading the facebook sharer php page. This
I am loading HTML into DOM and then querying it using XPath in PHP.

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.