I'm having a problem with a functioncall from my iFrame.
I have a page which houses an iframe. The contents of that is being generated in the script and has the following output:
Expand|Select|Wrap|Line Numbers
- <html>
- <head>
- <script type='text/javascript'>
- function edt(idx)
- {
- alert(idx);
- parent.test();
- }
- </script>
- </head>
- <body>
- <table cellpadding='2' cellspacing='2' border='1'><tr><td>ID</td><td>date</td><td>client</td><td>program</td><td>start time</td><td>stop time</td><td>overtime</td><td>extra</td><td>cost</td><td> </td></tr><tr><td>0</td><td></td><td>none</td><td>test2</td><td>none</td><td>none</td><td>TBD</td><td></td><td>TBD</td><td><input type='button' value='EDIT' onclick='edt(0)'</td></tr>
- </table>
- </body>
- </html>
So what happens when I push the button? Well I get the first alertbox with the indexnumber in it. So that's working well, but then when I try to call on the test function on the parent window I get "This property or method is not supported by this object". So clearly there is something wrong when he wants to access the functions on my parent page.
I've been looking all over the net and everywhere I keep finding the same answer parent.function () should do the trick except here it doesn't.
Might be worth mentioning that the functions are all in an external .js-file.
If anybody has the magic solution, please let me know :-)
Thanks!