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

Re: [ydn-javascript] Problems with YAHOO.util.Event.addListener

Expand Messages
  • Adam Moore
    ... Try removing the quotes from window : YAHOO.util.Event.addListener(window, load , blogSearch.init); YAHOO.util.Event.addListener(window, load ,
    Message 1 of 3 , Mar 2 4:51 PM
    • 0 Attachment
      On Fri, Mar 03, 2006 at 12:36:59AM -0000, ejeliot2005 wrote:
      > Hi,
      >
      > I've got two JS scripts included in my site
      > (www.ejeliot.com/js/blog-search.js and
      > www.ejeliot.com/js/link-tracking.js) as well as the files for the
      > Yahoo! event library (YAHOO.js and event.js) via script tags.
      >
      > The blog-search and link-tracking scripts each include an addListener
      > call for window.onload as shown below:
      >
      > YAHOO.util.Event.addListener('window', 'load', blogSearch.init);
      > YAHOO.util.Event.addListener('window', 'load', linkTracking.init);

      Try removing the quotes from 'window':

      YAHOO.util.Event.addListener(window, 'load', blogSearch.init);
      YAHOO.util.Event.addListener(window, 'load', linkTracking.init);


      -Adam
    • ejeliot2005
      Hi Adam, Thanks for pointing that out. Not sure when the quotes crept in but really stupid of me not to notice. ;-) Regards, Ed
      Message 2 of 3 , Mar 2 4:58 PM
      • 0 Attachment
        Hi Adam,

        Thanks for pointing that out. Not sure when the quotes crept in but
        really stupid of me not to notice. ;-)

        Regards,

        Ed

        --- In ydn-javascript@yahoogroups.com, Adam Moore <adamoore@...> wrote:
        >
        > On Fri, Mar 03, 2006 at 12:36:59AM -0000, ejeliot2005 wrote:
        > > Hi,
        > >
        > > I've got two JS scripts included in my site
        > > (www.ejeliot.com/js/blog-search.js and
        > > www.ejeliot.com/js/link-tracking.js) as well as the files for the
        > > Yahoo! event library (YAHOO.js and event.js) via script tags.
        > >
        > > The blog-search and link-tracking scripts each include an addListener
        > > call for window.onload as shown below:
        > >
        > > YAHOO.util.Event.addListener('window', 'load', blogSearch.init);
        > > YAHOO.util.Event.addListener('window', 'load', linkTracking.init);
        >
        > Try removing the quotes from 'window':
        >
        > YAHOO.util.Event.addListener(window, 'load', blogSearch.init);
        > YAHOO.util.Event.addListener(window, 'load', linkTracking.init);
        >
        >
        > -Adam
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.