I'm having problems with jquery after a page gets loaded via an iframe.
Here's how it works. Mainpage.php has an iframe within it that I use to upload photos/files. On Mainpage.php there is a div that I use to display the photos/files. The div gets populated by an ajax call that retrieves the html and places it inside the div. Everything works fine when I come to Mainpage.php and click on the photos link, which runs the ajax and loads the photos/files.
Problem: I have a "new" button that displays the iframe. Inside the iframe page I use the form upload to upload photos to the server, then if successful I echo a javascript string that runs the same ajax code to display the photo's in the proper div. Everything works and it will update the div on the Mainpage.php, However, the photos get displayed, but the jquery functionality no longer works, so my tablesorter functionality stops working (error: document is null), and the photos don't display with their border (I use css tied to a class, which jquery applies to the elements to display the border). I'm using visuallightbox for my photo gallery and the jquery javascript used to show the images no longer works. The error I get with the photo load is: "uncaught exception.....NS_ERROR_INVALID_POINTER".
Any ideas how to fix/get around this will be appreciated. thanks.