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

Re: Javascript Function Question

Expand Messages
  • Andrew Myers
    Okay I ve worked out to some extent what s happening here. The onDialog3Show function seems to be attached to the dialog3.show() event via the following code,
    Message 1 of 2 , Dec 26, 2007
    • 0 Attachment
      Okay I've worked out to some extent what's happening here.

      The onDialog3Show function seems to be attached to the dialog3.show()
      event via the following code, with the first and 2nd params
      corresponding to the e and o parameters for onDialog3Show respectively.

      YAHOO.com.thecodecentral.dialog3.showEvent.subscribe(onDialog3Show,
      YAHOO.com.thecodecentral.dialog3);

      However what I'd really like to do is pass another parameter through
      to onDialog3Show, but I'm not sure that is possible...?

      --- In ydn-javascript@yahoogroups.com, "Andrew Myers" <am2605@...> wrote:
      >
      > Hi,
      >
      > I'm currently looking at the lightbox examples on this page:
      >
      > http://test.thecodecentral.com/demos/lightbox/lightbox.html
      >
      > My question is probably a fundamental Javascript one rather than a YUI
      > one...sorry to ask it here but I can't find any doco or examples to
      > help me..
      >
      > In the source there is a function as follows below. Is anyone able to
      > explain to me the "e, args, o" parameters? I'm assuming that e is
      > event, and o is the calling object, but I'm not really sure how /
      > where they get set? Any advice would be greatly appreciated.
      >
      > var onDialog3Show = function(e, args, o){
      > var frame = document.createElement('iframe');
      > frame.src = "http://gooogle.com";
      > frame.width = "100%";
      > frame.height = "480";
      > o.setBody(frame);
      > };
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.