Loading ...
Sorry, an error occurred while loading the content.

Create a YUI Panel form Bookmarklet?

Expand Messages
  • walkinlikeapanther
    Does anyone have a working method to create YUI Container Panels via a bookmarklet control that works on any page? I currently follow this procedure: 1.
    Message 1 of 1 , Sep 3, 2008
    View Source
    • 0 Attachment
      Does anyone have a working method to create YUI Container Panels via a
      bookmarklet control that works on any page?

      I currently follow this procedure:
      1. Bookmarklet injects < script > tag with custom JS from my site.
      2. This script then loads YUI Loader as < script > into environment.
      3. After YUI Loader script loads (script_el.onload) call a function.
      4. Function uses Loader to load YUI Container controls.
      5. Next, function creates a new YAHOO.widgets.Panel.
      6. I set Panel head, body, etc. and then render to document.body.

      This works as expected, as long as I'm on the originating domain.
      However, on other domains the head, body, footer content is rendered
      in correct location with styles applied, but they just appear. It does
      not look like a Panel, the sam skin doesn't apply, and it is not
      draggable or closeable. It looks primarily like some divs have been
      added and that's all.

      I recognize that the same origin policy plays a role when loading
      scripts from different sites in this way. However, I can't tell from
      the documentation why Panel fails. I've disabled iframe config
      property, as well as monitorresize (which is default true) because
      both of these use iframes and would likely be inaccessible due to the
      same-origin policy. Is there something else I can try or is this truly
      not supported/feasible?
    Your message has been successfully submitted and would be delivered to recipients shortly.