#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2009
    Posts
    103
    Rep Power
    16

    Call JS function in an iframe


    I've got FullCalendar sitting in an iframe that's hidden in a jquery dialogue modal. In FF and chrome it works great however in IE the calendar won't render.

    I've written a JSfunction that lives with the calendar to render it.
    Code:
    function Render()
    	 {
    	  $('#calendar').fullCalendar( 'render' );
    	 }
    on the page hosting the iframe i've got a link that will trigger the JQuery dialogue box.

    Code:
    <A href="#" id="opener" onclick="document.getElementById('iframe2').contentWindow.Render();">Test</A>
    This refuses to trigger the function. I can run the function from inside the iframe but not like this. I'm starting to run out of things to try.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2009
    Posts
    103
    Rep Power
    16
    Originally Posted by dsfx
    I've got FullCalendar sitting in an iframe that's hidden in a jquery dialogue modal. In FF and chrome it works great however in IE the calendar won't render.

    I've written a JSfunction that lives with the calendar to render it.
    Code:
    function Render()
    	 {
    	  $('#calendar').fullCalendar( 'render' );
    	 }
    on the page hosting the iframe i've got a link that will trigger the JQuery dialogue box.

    Code:
    <A href="#" id="opener" onclick="document.getElementById('iframe2').contentWindow.Render();">Test</A>
    This refuses to trigger the function. I can run the function from inside the iframe but not like this. I'm starting to run out of things to try.


    Well i figured it out. I forgot to put an ID on my iframe.

IMN logo majestic logo threadwatch logo seochat tools logo