There shouldn't be a problem with this as long as both the parent document and
the iframe are showing pages from the same domain.
When you bind your events, when you pass in your function/functor/function
pointer/etc have the internal code doe something like this:
-function()
{
parent.someFunctionCallThatIsOnTheParentWindow( statusInformationObject
);
}
i.e.
In your IFRAME:
- <script type="text/javascript">
- var statusObject = {success:true,filename:"theNameUpdated.txt"};
-
- $(document).ready( function(){ parent.updateFileUploadStatus( statusObject
);} )
-
- </script>
In your parent window/document (the one w/ the <IFRAME> markup):
- <script type="text.javascript">
-
- function updateFileUploadStatus( status )
- {
- ...do stuff
- }
-
- </script>
-Andrew Martinez
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Vaska
Sent: Wednesday, February 14, 2007 8:21 AM
To: jQuery Discussion.
Subject: [jQuery] watching events in iframes
Yes, I should just try this...or...I should search this mail list.
I've searched the list and didn't find what I was looking for though.
Am I able, with JQuery, to watch events in an iFrame?
Per the usual, I'm trying to build a file uploader that doesn't
refresh the entire page. Meaning, that after the files have been
uploaded and the iframe returns (with some kind of a trigger for
JQuery if need be), I want a div on the parent page to go into action
and update the info.
Logically, I'm not sure this could work though...because of the
iFrame refresh.
Anyways, looking for advice regarding watching iFrame events...
Thanks...
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/