Reputation: 21
I have a page on my site with a popup div:
<div data-role="popup" id="MyPopup">
<a href="#" data-rel="back" data-theme="a" data-icon="delete"
class="...">Close</a>
<div id="Gaia_Ages_Content" class="...">
<p>Oops! Could not find information for that item!</p>
</div>
</div>
I use the .load method to display external HTML files in the popup:
$("MyPopup").load(_LoadUrl);
That much works just fine.
I have a handler for the "popupafterclose" event that resets the content of the popup to serve as an error message if the file to be loaded is not found:
$("MyPopup").on("popupafterclose",function(event, ui) {
...
$thisPage_Popup.html('<div ... </div>');
});
This too works just fine.
What doesn't work is a second handler.
$("MyPopup").on("pagecontainerload",function(event, ui) {
LinkExtTarget (_thisPage_Popup);
});
The point of this is to call a function that will force all external links to open in a new window. That function works when called elsewhere. The popupafterclose handler is triggered just when I expect it, and the function is executed properly. The pagecontainerload handler is NEVER triggered, and the external links are not handled as I thought they would be.
I'd appreciate any help.
Upvotes: 2
Views: 544