|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
YAHOO is not defined problemHi,
I am new to YUI and playing around with it. when i try to build an example of Menu control, it says YAHOO is not defined in Fire Fox error console. Could some one please help me out? Following are the code snippet <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" type="text/css" href="H:\rk_eclipse_workspace\yui\yui\build\fonts\fonts.css"> <link rel="stylesheet" type="text/css" href="H:\rk_eclipse_workspace\yui\yui\build\reset\reset.css"> <link rel="stylesheet" type="text/css" href="H:\rk_eclipse_workspace\yui\yui\build\menu\menu.css"> <script type="text/javascript" src="H:\rk_eclipse_workspace\yui\yui\build\yahoo\yahoo.js"></script> <script type="text/javascript" src="H:\rk_eclipse_workspace\yui\yui\build\event\event.js"></script> <script type="text/javascript" src="H:\rk_eclipse_workspace\yui\yui\build\dom\dom.js"></script> <script type="text/javascript" src="H:\rk_eclipse_workspace\yui\yui\build\container\container_core.js">\ </script> <script type="text/javascript" src="H:\rk_eclipse_workspace\yui\yui\build\menu\menu.js"></script> <script type="text/javascript"> YAHOO.example.onMenuReady = function() { // Instantiate and render the menu bar and corresponding submenus var oMenu = new YAHOO.widget.Menu("regionmenu", { fixedcenter:true, visible:true }); oMenu.showEvent.subscribe(function() { this.focus(); }); oMenu.render(); YAHOO.util.Event.addListener("menutoggle", "click", oMenu.show, null, oMenu); }; // Initialize and render the menu bar when it is available YAHOO.util.Event.onContentReady("regionmenu", YAHOO.example.onMenuReady); </script> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Multi-level menu</title> </head> <body> <div id="regionmenu" class="yui-menu"> <div class="bd"> <ul class="first-of-type"> <li class="yuimenuitem">Europe,East <div id="apps" class="yui-menu"> <div class="bd"> <ul> <li class="yuimenuitem"><a href="viewTrans">View Transactions</a></li> <li class="yuimenuitem"><a href="viewTrans">Add Transactions</a></li> <li class="yuimenuitem"><a href="viewTrans">Search Transactions</a></li> </ul> </div> </div> </li> <li class="yuimenuitem">Europe,East <div id="apps" class="yui-menu"> <div class="bd"> <ul> <li class="yuimenuitem"><a href="viewTrans">View Transactions</a></li> <li class="yuimenuitem"><a href="viewTrans">Add Transactions</a></li> <li class="yuimenuitem"><a href="viewTrans">Search Transactions</a></li> </ul> </div> </div> </li> <li class="yuimenuitem">Asia Pacific <div id="apps" class="yui-menu"> <div class="bd"> <ul> <li class="yuimenuitem"><a href="viewTrans">View Transactions</a></li> <li class="yuimenuitem"><a href="viewTrans">Add Transactions</a></li> <li class="yuimenuitem"><a href="viewTrans">Search Transactions</a></li> </ul> </div> </div> </li> <li class="yuimenuitem">North America <div id="apps" class="yui-menu"> <div class="bd"> <ul> <li class="yuimenuitem"><a href="viewTrans">View Transactions</a></li> <li class="yuimenuitem"><a href="viewTrans">Add Transactions</a></li> <li class="yuimenuitem"><a href="viewTrans">Search Transactions</a></li> </ul> </div> </div> </li> <li class="yuimenuitem">Latin America</li> </ul> </div> </div> </body> </html> |
|
|
|
|
|
Re: YAHOO is not defined problem--- In ydn-javascript@..., "ramkumarez" <ramkumarez@...>
wrote: > > Hi, > > I am new to YUI and playing around with it. when i try to build an > example of Menu control, it says YAHOO is not defined in Fire Fox error > console. > > Could some one please help me out? > > Following are the code snippet > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> > <html> > <head> > <link rel="stylesheet" type="text/css" > href="H:\rk_eclipse_workspace\yui\yui\build\fonts\fonts.css"> > <link rel="stylesheet" type="text/css" > href="H:\rk_eclipse_workspace\yui\yui\build\reset\reset.css"> > <link rel="stylesheet" type="text/css" > href="H:\rk_eclipse_workspace\yui\yui\build\menu\menu.css"> > > <script type="text/javascript" > src="H:\rk_eclipse_workspace\yui\yui\build\yahoo\yahoo.js"></script> > <script type="text/javascript" > src="H:\rk_eclipse_workspace\yui\yui\build\event\event.js"></script> > <script type="text/javascript" > src="H:\rk_eclipse_workspace\yui\yui\build\dom\dom.js"></script> > <script type="text/javascript" > > </script> > <script type="text/javascript" > src="H:\rk_eclipse_workspace\yui\yui\build\menu\menu.js"></script> Try reordering the script load sequence to: * yahoo.js * dom.js * event.js Or use the concatenated file "yahoo-dom-event.js". Does that resolve the error? Regards, Thomas |
|
|
Re: YAHOO is not defined problem--- In ydn-javascript@..., "tssha" <tsha@...> wrote:
> > --- In ydn-javascript@..., "ramkumarez" <ramkumarez@> > wrote: > > > > Hi, > > > > I am new to YUI and playing around with it. when i try to build an > > example of Menu control, it says YAHOO is not defined in Fire Fox error > > console. > > > > Could some one please help me out? > > > > Following are the code snippet > > > > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> > > <html> > > <head> > > <link rel="stylesheet" type="text/css" > > href="H:\rk_eclipse_workspace\yui\yui\build\fonts\fonts.css"> > > <link rel="stylesheet" type="text/css" > > href="H:\rk_eclipse_workspace\yui\yui\build\reset\reset.css"> > > <link rel="stylesheet" type="text/css" > > href="H:\rk_eclipse_workspace\yui\yui\build\menu\menu.css"> > > > > <script type="text/javascript" > > src="H:\rk_eclipse_workspace\yui\yui\build\yahoo\yahoo.js"></script> > > <script type="text/javascript" > > src="H:\rk_eclipse_workspace\yui\yui\build\event\event.js"></script> > > <script type="text/javascript" > > src="H:\rk_eclipse_workspace\yui\yui\build\dom\dom.js"></script> > > <script type="text/javascript" > > > > > </script> > > <script type="text/javascript" > > src="H:\rk_eclipse_workspace\yui\yui\build\menu\menu.js"></script> > > Try reordering the script load sequence to: > * yahoo.js > * dom.js > * event.js > > Or use the concatenated file "yahoo-dom-event.js". > > Does that resolve the error? > > Regards, > Thomas > Hi Thomas, Thank you so much for your prompt response. Much appreciated. I tried to re-order yahoo.js, dom.js and event.js. it did not solve the problem. i either tried to put yahoo-dom-event.js also now i am getting a text saying "submenu-collapsed. click to expand sub-menu and in Firefox the display is getting screwed up. Could you please help me out, as i am really struggling out with this? Is there any compatible issues with browser? My m/c setup is as follows: I have downloaded 2.2.2 YUI Win XP IE 6 Fire Fox with Firebug installed Thanks, Ramkumar |
|
|
Re: YAHOO is not defined problemI'd try switching to the Yahoo-hosted versions, just to eliminate any
possibility of a file path issue. <script src="http://yui.yahooapis.com/2.2.2/build/yahoo-dom-event/yahoo-dom-event.js" type="text/javascript"></script> and so forth. HTH, Ted. --- In ydn-javascript@..., "ramkumarez" <ramkumarez@...> wrote: > > Hi, > > I am new to YUI and playing around with it. when i try to build an > example of Menu control, it says YAHOO is not defined in Fire Fox error > console. |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |