View Full Version : short bit of js to dynamically load multiple pages into iframe

01-27-2011, 09:48 PM
I'm slowly scraping away errors from a page im working on and ive found this forum to be very helpful- down to one more that i wanted to post on.
sample page is here:http://darrenlasso.com/freelance/lookbook_dir/lookbook.html

Works fine in most all browsers except for IE8- ive even had to include built in ie7 compatibility to get it to work at all. Problem is most likely associated with my js, which is:

function ShowPage(frame)

frames[0].location = frame+'.html'

and html is:

<div id="thumb1"><a onmouseover="ShowPage('frame1')"onclick="ShowPage('frame1')" target="mainbox"></a></div>
<div id="thumb2"><a onmouseover="ShowPage('frame2')"onclick="ShowPage('frame2')" target="mainbox"></a></div>
<div id="thumb3"><a onmouseover="ShowPage('frame3')"onclick="ShowPage('frame3')" target="mainbox"></a></div>etc etc..

Which is just something i found online - probly isnt right for what im trying to accomplish. If you go to the site- you navigate by hovering over/clicking the images at the top and that loads a new page into the iframe below. Id like to be able to fix the errors and get it working without having to force ie7 compatibility if possible too. Any help is much appreciated