[Dojo-interest] LightboxNano does not work programatically

Jared Jurkiewicz jared.jurkiewicz at gmail.com
Thu Jun 3 10:50:48 EDT 2010


You have to use the full widget name:

new dojox.image.LightboxNano()

NOT:
new LightboxNano

-- Jared

On Thu, Jun 3, 2010 at 10:42 AM, Guy Harel <harelguy at gmail.com> wrote:
> Hi all,
> I'm trying to use the excellent LightboxNano to enlarge an image. It works
> pretty well declaratively, but I'm trying to use it programatically.
> It fails on Firefox and Explorer 8 when trying to construct the new
> LightboxNano object, with the error: "LightboxNano is undefined".
> I'm definitely including the LightboxNano module, I can see it loading when
> I dojo.require it. However, the constructor doesn't seem to work.
>
> Any clues?
>
> Thanks!
> Guy
>
> This is my html page:
>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
> <title>Insert title here</title>
> <script type="text/javascript">
> //<![CDATA[
>     var djConfig = {"parseOnLoad":false};
> //]]>
> </script>
> <script type="text/javascript"
> src="/js/dojo/dojo.js.uncompressed.js"></script>
> <script type="text/javascript"
> src="/js/dojo/viva-dojo.js.uncompressed.js"></script>
> <link href="/js/dojo/dojox/image/resources/image.css" media="screen"
> rel="stylesheet" type="text/css" />
>
> <script>
> dojo.addOnLoad(function() {dojo.parser.parse()});
> </script>
>
> </head>
> <body>
> <img id="mainLookImg"
> src="http://localhost/data/images/look/medium/medium_88_1274792740.jpg"/>
> <script type="text/javascript">
>     dojo.addOnLoad(function(){
>         dojo.require("dojox.image.LightboxNano");
>         new LightboxNano({
>             href:
> "http://localhost/data/images/look/large/large_88_1274792740.jpg"
>         }, "mainLookImg");
>     });
> </script>
> </body>
> </html>
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> Dojo-interest at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
>


More information about the Dojo-interest mailing list