Glenn, Next time, please (1) remove the target directory so the zip file is smaller and (2) post it to the main list so everyone can see what's up.
The problem is coming from the library that you're using. It's trying to set an innerHTML to <img src='elements/white/min.png' class='collapsedContainer'> This is not valid XHTML. It should be <img src='elements/white/min.png' class='collapsedContainer' ></img> Please contact the library producer and report this as a defect. Thanks, David On Sat, Apr 11, 2009 at 2:30 PM, Glenn Silverman <[email protected]> wrote: > David, > > I've attached a zip of the full, "simple" example I'm working on. It's > pretty straight-forward. Just a simple lift-archetype-blank project > generation with a small change to Boot.scala, default.html and index.html. > The rest of the files are just extracted from the > jquery.mbContainerPlus.1.7.6 plugin. I've also added a folder, > "WithoutLift", where you can see exactly how index.html should look > when just run in a browser. > > I'm sure it's just a resource path problem. > > Thanks in advance for your help. > > Glenn Silverman > > > > David Pollak wrote: > >> Please post a simple example that fails on Firefox. I'll clean it up for >> you. >> >> On Sat, Apr 11, 2009 at 11:42 AM, glenn <[email protected]> wrote: >> >> >> >>> Dave, >>> >>> I appreciate your input. I've tried many permutations of code to try >>> to get this to work. The <![CDATA[ block didn;t work. I even just put >>> all the code into default.html as-is - no widget at all, no special >>> parsing involved, and still no luck. >>> >>> I did get rid of the Firefox error by removing the unparsed stuff. >>> However, the code still doesn't work because I think it can't find the >>> elementsPath >>> "elements/". In fact, now it doesn't even work in IE. >>> >>> This path contains all the images used by the container. I've placed >>> them in src\main\webapp\elements. Do >>> I also need to manage this somehow in Boot with ResourceServer.allow >>> and/or put the images someplace else? >>> >>> The strange thing is that when I was getting the Firefox error, the >>> container images worked fine in IE. So it seemed the elementsPath was >>> OK. >>> This leads me to believe there is some parsing going on in Lift that I >>> just don't grasp. But, then again, it's probably something simple. >>> >>> Glenn Silverman >>> >>> >>> On Apr 11, 6:53 am, David Pollak <[email protected]> >>> wrote: >>> >>> >>>> On Fri, Apr 10, 2009 at 9:49 PM, glenn <[email protected]> wrote: >>>> >>>> >>>> >>>>> I'm getting concerned about the viability of a Lift/JQuery web >>>>> solution. I am trying to implement a widget around the >>>>> jquery.mbContainerPlus.1.7.6 plugin. I can get it to work in IE 7, >>>>> but not in Firefox 3.08, where I get the following firebug error: >>>>> [Exception... "Component returned failure code: 0x80004003 >>>>> (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML]" nsresult: >>>>> "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: >>>>> http://localhost:8080/classpath/jquery-1.3.2.js:: anonymous :: line >>>>> 251" data: no] >>>>> http://localhost:8080/classpath/jquery-1.3.2.js >>>>> Line 251 >>>>> This has to do with an innerHtml line that shows up in >>>>> jquery.js, >>>>> although line 251 in that file is actually blank, so I don't know >>>>> where it comes from. >>>>> Creating the widget was simple. I just created a class to spit >>>>> out the >>>>> relevant NodeSeqs: >>>>> class Container { >>>>> def renderHead(xhtml: NodeSeq): NodeSeq = { >>>>> <head> >>>>> <link rel="stylesheet" type="text/css" href={"/" + >>>>> LiftRules.resourceServerPath +"/mbContainer.css"} title="style" >>>>> media="screen"/> >>>>> <script type="text/javascript" src={"/" + >>>>> LiftRules.resourceServerPath + "/mbContainer.js"}></script> >>>>> <script type="text/javascript" src={"/" + >>>>> LiftRules.resourceServerPath + "/ui.core.min.js"}></script> >>>>> <script type="text/javascript" src={"/" + >>>>> LiftRules.resourceServerPath + "/ui.draggable.min.js"}></script> >>>>> <script type="text/javascript" src={"/" + >>>>> LiftRules.resourceServerPath + "/ui.resizable.min.js"}></script> >>>>> <script type="text/javascript" src={"/" + >>>>> LiftRules.resourceServerPath + "/jquery.metadata.js"}></ >>>>> script> >>>>> >>>>> >>>> This should be escaped in a <![CDATA[ block: >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>>> <script type="text/javascript">{ >>>>> Unparsed(""" >>>>> $(function(){ >>>>> $(".containerPlus").buildContainers({ >>>>> containment:"document", >>>>> elementsPath:"elements/" >>>>> }); >>>>> }); >>>>> """) >>>>> } >>>>> </script> >>>>> </head> >>>>> } >>>>> >>>>> >>>> Why is this Unparsed? Why not just use XML? >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>>> def renderContainer(xhtml: NodeSeq): NodeSeq = { >>>>> Unparsed(""" >>>>> <div class="containerPlus resizable {buttons:'m,c', >>>>> skin:'white'}"> >>>>> <div class="no"> >>>>> <div class="ne"> >>>>> <div class="n">main content</div> >>>>> </div> >>>>> <div class="o"> >>>>> <div class="e"> >>>>> <div class="c"> >>>>> <div >>>>> >>>>> >>>> class="content">This is >>> >>> >>>> the main content</div> >>>>> </div> >>>>> </div> >>>>> </div> >>>>> <div> >>>>> <div class="so"> >>>>> <div class="se"> >>>>> <div class="s"></div> >>>>> </div> >>>>> </div> >>>>> </div> >>>>> </div> >>>>> </div> >>>>> """) >>>>> } >>>>> If I have to jump through hoops to get it to work in Firefox, >>>>> what >>>>> good is Lift? Or, am I just missing something obvious? If anyone has >>>>> had similar problems and has a workaround, please help. >>>>> >>>>> >>>> The only problem I've ever had with Firefox is a bug related to >>>> >>>> >>> attributes >>> >>> >>>> with namespaces. >>>> >>>> Please note that Lift serves XHTML and Firefox is very strict about >>>> validating XHTML. Unless you are serving your static page with a mime >>>> >>>> >>> type >>> >>> >>>> of application/xhtml+xml, you will not trigger Firefox's heightened >>>> validation. >>>> >>>> >>>> >>>> >>>> >>>>> By the way, if I just create an html file with the containerPlus node >>>>> as above and display it in Firefox without using Lift, I don't get the >>>>> error. Everything works great. >>>>> Glenn Silverman >>>>> >>>>> >>>> -- >>>> Lift, the simply functional web frameworkhttp://liftweb.net >>>> Beginning Scalahttp://www.apress.com/book/view/1430219890 >>>> Follow me:http://twitter.com/dpp >>>> Git some:http://github.com/dpp >>>> >>>> >>> >> >> >> > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
