Help calling a function defined in loaded page

Help calling a function defined in loaded page

Hi,

I am hoping someone can help me with this as I do not have many alternatives.

First, let me explain why I am trying to do what I am doing.  I need to convert PDF documents to HTML 5 so they can be displayed on mobile and desktop browsers.  I found a program to convert pdf files to HTML 5, but it uses canvas and has scripts embedded on the page to get everything to show up properly.  I need to load this created PDF to HTML 5 page into another page using the jQuery.load('PdfPage.html') so I can put an interface around the page and make it appear as it is a part of my site/ application.

I am having a problem getting scripts from the PDF converted page to run.  Unfortunately, the auto generated "PdfPage.html" does not use jQuery and runs the script by calling it on the <body onload ="functionName();">

I am wondering if there is any way that I can call the script "functionName();" on "PdfPage.html" after it is loaded on my page with the jQuery.load('PdfPage.html'). 

Also, the loaded page "PdfPage.html" references images that are loaded by script that use a relative path, and one jQuery.load loads a page those relative links are off.  I probably figure out a way to fix this, but was curious if there is a quick way around this?