On Wed, Aug 26, 2009 at 9:06 PM, Lance Zheng <[email protected]> wrote:
> > fixed. I love it when folks find answers to their own questions. Thanks for being part of the Lift community! > > because image name have '.' character, which is not allowed, so select > by id cant get the element. > > On Aug 27, 5:41 am, Lance Zheng <[email protected]> wrote: > > hi, > > please help me, I can't find the reason, the code on gisthttp:// > gist.github.com/175858 > > def remove(img:String)={ > > HomePage.removeImg(img) > > JsCmds.Run("$('#"+img+"').remove()") > > } > > var imglist=imgs.map(i =>{<li id={i}><img src={"/imgrecv/"+i}/ > > > > {SHtml.ajaxButton(S.?("delete"), () =>remove(i))}</ > > li>}) > > bind("list",xhtml,"imgs" -> <ul>{imglist}</ul>) > > I'm sure jquery is working on that page, but [ JsCmds.Run("$('#"+img > > +"').remove()") ]do nothing. > > the buttons are in those <li>s, when click, remove the li wrap it,and > > also remove the button itself. > > the page sourse in browser: > > > > ...... > > <script type="text/javascript" src="/classpath/jquery.js" > > id="jquery"></script> > > <script type="text/javascript" src="../scripts/main.js"></ > > script> > > <script type="text/javascript" src="/ajax_request/liftAjax.js"></ > > script> > > ...... > > <ul><li id="6ddb344021a7ae8b8ff24fd749535916.bmp"><img src="/imgrecv/ > > 6ddb344021a7ae8b8ff24fd749535916.bmp"></img> > > <button onclick="lift_ajaxHandler > > ('F221624803867WVC=true', null, null); return false;">delete</button></ > > li></ul> > > ...... > > something wrong I do? > > > > thanks > > Lance > > > > -- 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 -~----------~----~----~----~------~----~------~--~---
