Folks,
I have got this working before, in part with some help from this ng but
I never really understood how I got it working... and last time, I was
using it via a popup window as opposed to an IFRAME. I've got several
months of javascript under my belt and can resolve most things without
errors in my Mozilla Javascript Console, but this one just does not do
it for me.
This is the picture:
I have my 'parent' (main) window that contains a script - for test
purposes, its called myFunction(). It contains a simple hello world in
an alert call.
I have an IFRAME inside the parent. The IFRAME window is called winda2.
I want my IFRAME (thus, the child) to call myFunction from the parent
and my attempts thus far have failed.
From within my child window, I have done the following:
<script language="JavaScript" type="text/javascript">
window.opener.myFunction();
</script>
I've played with the above call and done variations of the above and get
the following messages in Mozilla Javascript Console:
Error: opener has no properties
Error: window.myFunction is not a function
and other similar type messages.
Can someone help point me in the right direction? It would be greatly
appreciated... please reply via the newsgroup so all can learn,
thanks
randell d. 2 4483
Randell D. wrote: Folks,
I have got this working before, in part with some help from this ng but I never really understood how I got it working... and last time, I was using it via a popup window as opposed to an IFRAME. I've got several months of javascript under my belt and can resolve most things without errors in my Mozilla Javascript Console, but this one just does not do it for me.
This is the picture:
I have my 'parent' (main) window that contains a script - for test purposes, its called myFunction(). It contains a simple hello world in an alert call.
I have an IFRAME inside the parent. The IFRAME window is called winda2.
I want my IFRAME (thus, the child) to call myFunction from the parent and my attempts thus far have failed.
From within my child window, I have done the following:
<script language="JavaScript" type="text/javascript"> window.opener.myFunction(); </script>
I've played with the above call and done variations of the above and get the following messages in Mozilla Javascript Console:
Error: opener has no properties Error: window.myFunction is not a function
and other similar type messages.
Can someone help point me in the right direction? It would be greatly appreciated... please reply via the newsgroup so all can learn,
thanks randell d.
Found it...
From inside my IFRAME, I call the script that is loaded in the parent
window using
top.myFunction();
randelld
The Opener property will only work in floating windows. not in
iframes. Try using parent.myfunction() or top.myfunction()
--
Arik Segal
Tel-Aviv
On Thu, 17 Mar 2005 08:07:06 GMT, "Randell D."
<re************************@fiprojects.moc> wrote: Folks,
I have got this working before, in part with some help from this ng but I never really understood how I got it working... and last time, I was using it via a popup window as opposed to an IFRAME. I've got several months of javascript under my belt and can resolve most things without errors in my Mozilla Javascript Console, but this one just does not do it for me.
This is the picture:
I have my 'parent' (main) window that contains a script - for test purposes, its called myFunction(). It contains a simple hello world in an alert call.
I have an IFRAME inside the parent. The IFRAME window is called winda2.
I want my IFRAME (thus, the child) to call myFunction from the parent and my attempts thus far have failed.
From within my child window, I have done the following:
<script language="JavaScript" type="text/javascript"> window.opener.myFunction(); </script>
I've played with the above call and done variations of the above and get the following messages in Mozilla Javascript Console:
Error: opener has no properties Error: window.myFunction is not a function
and other similar type messages.
Can someone help point me in the right direction? It would be greatly appreciated... please reply via the newsgroup so all can learn,
thanks randell d. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Reply Via Newsgroup |
last post by:
Folks,
I was sure this could be done - or at least sure I had seen reference to
it at some point or other - but now, after having gone for a cup of tea,
am begining to doubt my original belief....
|
by: CJack |
last post by:
hy,
I have an mdi application, i create a child form and I want to know
when a button is pressed while that child form is loaded.
I have this code:
private void frmTestBaby_KeyUp(object sender,...
|
by: Earl Teigrob |
last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
|
by: wlevins |
last post by:
I have a simple script which has worked flawlessly for years - it copies a bit of data from a child window down into a form field in the parent window that opened the child.
But now in Firefox 2.0...
|
by: sangram |
last post by:
i need a javascript for popup window and how to pass value to that new
window from old window .
|
by: jd |
last post by:
Hi guys, I'm trying to create an HTML page that contains two frames.
The bottom frame should simply be some website, but the top frame needs
to have a close link to kill the window. I tried calling...
|
by: nupuragr82 |
last post by:
I have a parent form and on button click I am calling a child page where i have a textbox and a button. On button click of child form I am passing the value of the Textbox to the Textbox in parent...
|
by: Buddha |
last post by:
Hello,
I posted this on two forums, without too much help .. and I am kinda
stuck in this.
I need to refresh the parent page from the second child window which
is opened by the first child and...
|
by: Rina0 |
last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: erikbower65 |
last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps:
1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal.
2. Connect to...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: DJRhino1175 |
last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
If...
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
| |