Click to See Complete Forum and Search --> : accessing functions from iframes
sidownes
11-29-2002, 10:32 AM
Could anyone help me out with the syntax to use a function that is contained within an iframe from the main frameset.
I've tried
parent.frames.selectRow(gr_reportDetails[0][gc6_REPORT_TYPE]);
and abt a billion variations of that but with no luck.
Please can anyone help?!?
Rick Bull
11-30-2002, 06:08 AM
Not sure if I understand you but you can do something like this to access functions in an iframe:
document.frames['IFRAME_ID'].functionName();"
IFRAME_ID I think can be either the iframe's ID, NAME or index (no need for the quotes in this case).
sidownes
12-02-2002, 05:57 AM
I've tried that syntax as below:
document.frames['otherReports'].selectRow(1);
but just get the error message "document.frames has no properties".
What does this mean and why?
Thanks
Rick Bull
12-02-2002, 09:44 AM
Have you got this page online? If not can you upload it and give us the URI, it will be quicker and easier that way to find the error.
paraguma
10-28-2005, 09:53 AM
Not sure if I understand you but you can do something like this to access functions in an iframe:
document.frames['IFRAME_ID'].functionName();"
IFRAME_ID I think can be either the iframe's ID, NAME or index (no need for the quotes in this case).
can i accessing all iframes used in my page by index only not by their ids . ?
Kravvitz
10-28-2005, 01:52 PM
It's window.frames[], not document.frames[].