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

Re: [ydn-javascript] Simple example, not working?

Expand Messages
  • Eric Miraglia
    tropeanojohn, Kill the line break after return and you should be fine. Regards, Eric return { init : function() { alert( bar ); } };
    Message 1 of 2 , Dec 15, 2006
    • 0 Attachment
      tropeanojohn,

      Kill the line break after return and you should be fine.

      Regards,
      Eric

      returnĀ {
      init : function()
      {
      alert("bar");
      }
      };


      ______________________________________________
      Eric Miraglia
      Yahoo! Presentation Platform Engineering



      On Dec 14, 2006, at 7:07 PM, tropeanojohn wrote:

      Anyone know what I am doing wrong here?

      <!-- Include YUI -->
      <script type="text/javascript"
      src="lib/YahooUI/yahoo/yahoo-min.js"></script>
      <script type="text/javascript"
      src="lib/YahooUI/event/event-min.js"></script>
      <script type="text/javascript">

      /**
      * The MCM global namespace
      */
      YAHOO.namespace("mcm");

      /**
      * Page Functions defined
      * here
      */
      YAHOO.mcm = function() {

      return
      {
      init : function()
      {
      alert("bar");
      }
      };

      }();

      YAHOO.util.Event.on(window, 'load', YAHOO.mcm.init, YAHOO.mcm, true);
      </script>

      Thank you.


    Your message has been successfully submitted and would be delivered to recipients shortly.