Click to See Complete Forum and Search --> : function call from different window


simonbuzz
02-24-2003, 02:36 PM
HEy
I am trying to have a pop up window automatically call a function on its caller page. The function will then change the image on the page which stores the function. so the basic question is how can i call a function called mm_swapp(var1) which is on the caller page which started the popup. I am guessing it could be something simple like window.opener.document.mm_swapp(var1). Is this possible?

Any help would be grately appreciated

Phil Karras
02-24-2003, 03:05 PM
using: window.opener.document.mm_swapp(var1); is correct.

Why didn't you just try it?

simonbuzz
02-24-2003, 04:20 PM
I trid using the that cde but it didnt call it. I have a page which loads a pop up, then i have on eof the action files run this chucnk of javascript.

<script language="JavaScript">
window.opener.document.MM_swapImage('general','','images/processing.gif',1)
</script>

I know that the MM_swapImage works as i use it constantly. can anyone see why it would not be working. the function is on the page which created the popup.

Thanks, al help appreciated

Phil Karras
02-24-2003, 04:43 PM
In your MM_swapImage function put an alert to see what's coming back from the popup window.

If you want to see how to pass data back and forth between windows and frames you can go to my web site listed below and click on the [Data Passing] example.