[ 13 posts ] Go to page 1, 2 Next

Marc

YUI Contributor

  • Offline
  • Profile
Tags:

Using yui in an iframe

Post Posted: Thu Nov 18, 2010 3:47 am
+0-
Can I use YUI on an iframe?
If I have an iframe which loads content through a page call against the same server, I would expect to be able to call node functions on its content but that doesn't seem to work.

Marc

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile
Tags:

Re: Using yui in an iframe

Post Posted: Thu Nov 18, 2010 7:31 am
+0-
Marc --

You can, but the best way to do it is to wrap the iframe with it's own YUI instance. Something like this:

Wrapping a Frame

Click here to see the revision history on this Gist.

Marc

YUI Contributor

  • Offline
  • Profile

Re: Using yui in an iframe

Post Posted: Thu Nov 18, 2010 7:55 am
+0-
Thanks!

Mark

  • Offline
  • Profile

Re: Using yui in an iframe

Post Posted: Thu Nov 18, 2010 12:59 pm
+0-
I've been meaning to write a post on this for some time based on a working example. Ah well, best of intentions.

Please ignore some of the lazy coding including lack of use of Y.sub() for the template.

One nut I haven't been able to crack is firing the print call from the parent window. The only way I seem to be able to get this feature to perform reliably is to embed the call to window.print() in the child frame.

Anyhow, hope this example is useful to someone. I'll get round to writing that post eventually. ;)
Cheers,
Mark
codeinfront.com

Eric Miraglia

YUI Contributor

  • Username: miraglia
  • Joined: Tue Sep 02, 2008 10:59 am
  • Posts: 205
  • Location: Los Gatos, CA
  • Twitter: miraglia
  • GitHub: miraglia
  • Gists: miraglia
  • Offline
  • Profile
Tags:

Re: Using yui in an iframe

Post Posted: Thu Nov 18, 2010 5:55 pm
+0-
codeinfront wrote:
I've been meaning to write a post on this for some time...


Mark --

When you're up for it, we have this <a href="http://yuiblog.com">fantastic little blog</a> you could use....

-Eric

Mark

  • Offline
  • Profile
Tags:

Re: Using yui in an iframe

Post Posted: Thu Nov 18, 2010 6:29 pm
+0-
miraglia wrote:
When you're up for it, we have this fantastic little blog</a> you could use...


Hey Eric,

Sounds good. I have contributed a post already and would love to do another.

Let's chat.
Cheers,
Mark
codeinfront.com

Andrew Wooldridge

  • Username: triptych
  • Joined: Wed Oct 28, 2009 9:10 am
  • Posts: 80
  • Twitter: triptych
  • GitHub: triptych
  • Gists: triptych
  • IRC: triptych
  • Offline
  • Profile
Tags:

Re: Using yui in an iframe

Post Posted: Thu Feb 17, 2011 11:29 am
+0-
Vote++
Please write that article! This is a very cool feature of YUI that has very nice possibilities - esp with regards to embedding other content into your site.

Mark

  • Offline
  • Profile

Re: Using yui in an iframe

Post Posted: Fri Feb 18, 2011 8:34 pm
+0-
@triptych Would you be interested in doing a joint effort. Could tie in nicely with your new series.
Cheers,
Mark
codeinfront.com

Andrew Wooldridge

  • Username: triptych
  • Joined: Wed Oct 28, 2009 9:10 am
  • Posts: 80
  • Twitter: triptych
  • GitHub: triptych
  • Gists: triptych
  • IRC: triptych
  • Offline
  • Profile

Re: Using yui in an iframe

Post Posted: Fri Feb 25, 2011 1:41 pm
+0-
Sure, can you send me your notes? I can write up something and then let you preview before I post it. I'll dm you my email addy.

Michael Chambers

  • Username: MichaelChambers
  • Joined: Thu Mar 10, 2011 6:53 am
  • Posts: 10
  • Offline
  • Profile

Re: Using yui in an iframe

Post Posted: Mon Oct 03, 2011 9:57 am
+0-
Mark,
The working copy link isn't working. ;)
Did you two work out something and if so, where?
Thanks!
  [ 13 posts ] Go to page 1, 2 Next
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum