[jQuery] Re: jqModal - How to access the iframe from the parent

2008-09-05 Thread Francesc Rosàs

What about this?

parent.jQuery('#modalWindow').jqmHide()

I've tried something similar in IE 6  7, Firefox 3, Opera 9.5, Safari
3.1.2 and even Google Chrome and it seems to work.


[jQuery] Re: jqModal - How to access the iframe from the parent

2008-07-16 Thread isharerides.com

Hi there,

Just in case this helps you still, here is how I got this to work:

$(#button2).click(function() {
parent.top.$.closeDOMWindow({
closeNow:1
});
});

If you include this snippet into the site displayed in the iframe, you
can trigger the window to close by clicking on a button with the id
button2.

Hope that helps!

Phil


[jQuery] Re: jqModal - How to access the iframe from the parent

2008-07-16 Thread isharerides.com

Actually that only works in FireFox... IExplorer seems to be blocking
this due to security reasons.

On Jul 16, 5:34 pm, isharerides.com [EMAIL PROTECTED] wrote:
 Hi there,

 Just in case this helps you still, here is how I got this to work:

 $(#button2).click(function() {
 parent.top.$.closeDOMWindow({
 closeNow:1
 });
 });

 If you include this snippet into the site displayed in the iframe, you
 can trigger the window to close by clicking on a button with the id
 button2.

 Hope that helps!

 Phil


[jQuery] Re: jqModal - How to access the iframe from the parent

2008-07-02 Thread Alexandre Plennevaux

On Wed, Jul 2, 2008 at 11:42 PM, Hypolite [EMAIL PROTECTED] wrote:


 I'm still stuck with my jqModal iframe closing problem.

 But this time it's the other way I can't figure out.

 Here is my HTML/JS code for the parent windows :

 div id=div_modal class=jqmWindowiframe id=iframe
 src=form.html/iframe/div

 $().ready(function() {
  $('#div_modal').jqm(); //Initialization of the modal box

  $('#iframe').contents().find('input').click(function() {
$('#div_modal').jqmHide(); //The button inside the iframe must close the
 modal box in the parent
  })
 });

 The documentation says that contents() return the HTML document when
 called on an iframe, but it returns always null.

 Someone's got an idea ?

 Hypolite
 --
 View this message in context: 
 http://www.nabble.com/jqModal---How-to-access-the-parent-window-from-an-iframe--solved--tp18183904s27240p18247490.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.




well, AFAIK the only safe solution is to have the close button in the
same window as the jqModal container. you simply cannot access objects
in the main from the iframe for security reasons i think
.
also, i just wrote a how-to using jqModal with iframes. no help for
your specific issue, but maybe it helps for other things.

You can find it here :
http://www.pixeline.be/blog/2008/javascript-loading-external-urls-in-jqmodal-jquery-plugin/

The final example is here: http://www.pixeline.be/experiments/ThickboxToJqModal/

HTH
-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Re: jqModal - How to access the iframe from the parent

2008-07-02 Thread zaroundus


Excerpt from jqModal documentation:

 2.
  Triggers and Closes are typically added on the fly via CSS class
selections when $.jqm() 
  is called on element(s). They can also be manually added. e.g.
  
$(e).jqmAddTrigger(triggers) will add a trigger to open (show)
dialog(s) attached to e, and
$(e).jqmAddClose(closes) will add a close to close (hide) the
dialog(s) attached to e.

I have used the .jqmAddClose function with great success. It allows you to
specify the modal you want closed and the trigger that closes it.
-- 
View this message in context: 
http://www.nabble.com/jqModal---How-to-access-the-parent-window-from-an-iframe--solved--tp18183904s27240p18247627.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.