[ 3 posts ]

Sandy Reyes

  • Username: girl
  • Joined: Tue May 03, 2011 9:04 am
  • Posts: 1
  • Offline
  • Profile

Widget problem

Post Posted: Tue May 03, 2011 9:39 am
+0-
I am working with a widget, a menunav without any submenu, but I have errors: "null" is null or not an object.

help me.

Here is my code:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">         

 <title>YUI Library Examples: MenuNav Node Plugin</title>

<link rel="stylesheet" type="text/css"

href="http://yui.yahooapis.com/3.3.0/build/cssgrids/grids-min.css">

</head>
 

<body class="yui3-skin-sam">

<script type="text/javascript"

src="http://yui.yahooapis.com/3.3.0/build/yui/yui.js"></script>
 
<script type="text/javascript">

YUI({ filter: 'raw' }).use("node-menunav", function(Y) {
var oMenuNode = Y.one("#menu-1");
oMenuNode.plug(Y.Plugin.NodeMenuNav);
});

</script>
   
<div id="menu-1" class="yui3-menu-horizontal">
                                      <!-- Root menu bounding box -->
 <div class="yui3-menu-content">      <!-- Root menu content  box -->
   
  <ul>

   <li class="yui3-menuitem">         
     <a class="yui3-menuitem-content"
     href="http://www.yahoo.com">
     Yahoo!</a>                       
   </li>

   <li class="yui3-menuitem">
    <a class="yui3-menuitem-content"                                         

    href="http://mail.yahoo.com">Yahoo! Mail</a>
   </li>
 

  </ul>
 </div>
</div>

</body>
</html>

Todd Smith

YUI Contributor

  • Username: stlsmiths
  • Joined: Thu Nov 05, 2009 10:03 am
  • Posts: 675
  • GitHub: stlsmiths
  • Gists: stlsmiths
  • IRC: t_smith
  • Offline
  • Profile

Re: Widget problem

Post Posted: Tue May 03, 2011 10:40 am
+0-
Could you be a little more descriptive in what is wrong and when? Do you get "null" error on startup or on mouseover or click? What browser(s) are you seeing the error in?

This would help alot

Alberto Santini

YUI Contributor

  • Offline
  • Profile

Re: Widget problem

Post Posted: Tue May 03, 2011 12:51 pm
+0-
Hello Sandy.

I think you forgot to add class "yui3-menu" in your snippet.

For instance,
<div id="menu-1" class="yui3-menu yui3-menu-horizontal">

See also MenuNav Node Plugin: Basic Top Nav example [1].

Regards,
IceBox

[1] http://developer.yahoo.com/yui/3/exampl ... nav-2.html
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum