I've a php page with a menu.
One of the items of the menu, invokes another php, which returns a div
element filled with data, that is inserted into the former page (that the user is already seeing).
I'm trying to modify this div content using JavaScript, after loading it. However, I can't achieve it.
I've tried using ready()
method, but since it happens at a random time after loading it, this method doesn't work.
I've also tried with a load()
method I found which seemed to trigger after the item is loaded completely, but I didn't complete it neither. This was something like:
$( "#overlay #overlay_text div #panes div #tableInOverlay" ).load(function() {
alert("The table has been loaded");
});
How can I achieve it?
Thank you in advance
Edit: in order to try to make it clear
User access to the web page (File 1) -> User clicks in (File 1) Menu -> File 2 is invoked, which creates a response with a div
element -> (File 1) gets the response, and insert it into the HTML code, so the new div is shown.
Then, at this moment, I need (File 1) to modify this div that it just received.