Click to See Complete Forum and Search --> : call method in parent


freefall
11-22-2003, 04:39 PM
Hello, simple question.

How can I call a method which exists in the parent from an iframe within that page? I've accessed elements with no problem but an actual method call has got me stuck.

Thanks a lot!
- Ian Paterson

www.degreethree.com/newsite

fredmv
11-22-2003, 04:44 PM
Same idea pretty much.parent.methodName();

freefall
11-22-2003, 08:21 PM
That was all I could think, it made perfect sense, but it wouldn't work!

Of course now it does, go figure! It could have been a problem as simple as what I had actually uploaded... I'm intertwining PHP and shtml with javascript, so I'm working with 3-4 files and one probably didn't get uploaded.

Thanks a lot!
- Ian

fredmv
11-22-2003, 08:24 PM
You're welcome. Do you possibly have a link to the page so I (and others) can see this in action? It will make it easier for us to help you. :cool:

freefall
11-22-2003, 08:40 PM
Yeah sure, I'm working in www.degreethree.com/newsite/purchase.shtml ... select anything (just don't pay ;-) ), click proceed. The forms are autogenerated, just go to the bottom and click submit.

What I'm doing is having the results displayed in an iframe after the form is submitted, and the function that is being called is sizeMenu() which will correctly position the footer (because the iframe dimensions have been altered). I'm going to scrap the iframe idea though and just code my layout into the PHP and have the results on a different page, more standard that way. You'll see me working tonight!

It's not tested cross-browser yet, my layout is, but I'm going to go through the pages in IE, NS, Opera, Mozilla, Konquerer, and Mac IE soon, as the site is almost ready to launch.

Thanks again,
Ian