Advertisement

Iframes + safari

Moderators: Calcifer, slothy

Iframes + safari

Postby HomersGhost » Wed Dec 13, 2006 6:27 pm

Hey all,

First off, it's great to find a resource such as this on the web. The question of the hour has to do with iframes and safari. I built a fantasy game that allows my users to select their fantasy roster that is housed in an iframe. All of my functions are stored in the iframe.

The application works wonderful in IE and Firefox, but safari is giving me grief. If I try and access the test function in the iframe, I get the following error:

Value undefined (result of expression window.frames.freeagents.test) is not an object.

I'm calling the function like so:

window.frames.freeagents.test();

I've been slamming my head against my desk for some time trying work this one out. If any one can assist, I'd be be grateful.

Thanks for your help!
Brian
HomersGhost
 
Posts: 2
Joined: Wed Dec 13, 2006 6:15 pm

Postby Batalf » Wed Dec 13, 2006 11:43 pm

Hi and welcome to the forum :D

Have you tried

window.frames['freeagents'].test();
Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby HomersGhost » Wed Dec 13, 2006 11:55 pm

Thanks for the help ... I tried a plethora of approaches (including the one described) and nothing seemed to work. I found this article that seemed to hint at it:

http://xkr.us/articles/dom/iframe-document/

In the midst of my despair, one of my co-workers suggested I rid myself of the iframe and use a div with the overflow property set to auto.

It worked like a charm (although now I have to rewrite functions)

Thanks for your help!
HomersGhost
 
Posts: 2
Joined: Wed Dec 13, 2006 6:15 pm


Return to General questions regarding AJAX scripts

Who is online

Users browsing this forum: No registered users and 30 guests

cron