Document.ready script not working when page called into a tab
<p>I have several pages that are called onto an ajax tabbed area. the pages that are called have javascript on them however the document.ready function will not load for each of these pages when loaded onto the tab. Instead I have had to put a button on the pages to load the function manually. Iv tried putting the document.ready function on both the page being called and the pages calling it but it still wont run. Is there any other way i can use rather than having a button? I dont want buttons displaying on my pages that have to be clicked before it looks good =(</p>

<p>Heres the code that calls the the page:</p>

<pre><code>onclick="createNewTab('dhtmlgoodies_tabView1','Remote Access','','RemoteAccess.html',true);return false"&gt;Remote Access
</code></pre>

<p>All the javascript files are connected to the main page. </p>

<p>A button is located on the remoteaccess page:</p>

<pre><code>input type='button' value='Load.' onclick='loadlightbox()'
</code></pre>

<p>The loadlightbox function is inside a javascript file that is conected to the main page:</p>

<pre><code>loadlightbox = (function() {
    $('#gallery a').lightBox({fixedNavigation:true});
});
</code></pre>
