I don't understand why you need to assign the ID to the button.
> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>
>
--
Diego Medina
Web Developer
(305) 788-4954
di...@fmpwizard.com
http://www.fmpwizard.com
What do you mean by multi-comment blog, like a regular blog that has
already 10 comments and now one user wants to add yet one more
comment?
You still have just one box (for the comment) and one button (for the
"add comment"). Or maybe I still don't understand what you are trying
to do.
About the fixed location, maybe you have seen this, but what GMail
does is they have a floating DIV on the top, that is always visible,
no matter how far down on the page you are. Is this something you
would like?
Or are you trying to give people the option to edit their comment, so
you need a button next to each already placed comment ?
>
> An alternative is to use pop-up or do something with the ajaxInvoke or
> equiv.
I would hate a popup :)
>
> Please kindly suggest alternative.
>
> Thanks,
Regards,
Diego
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Now that I see your use case I understand better, what I would do is
use SHtml.swappable
In short, you render one element, the button, and on click, it will
swap the button for some other element, in this case it would display
the message "you item has been added"
You can see the definition of it here
https://github.com/lift/framework/blob/master/web/webkit/src/main/scala/net/liftweb/http/SHtml.scala
search for
def swappable
if you need more help just reply here.
Regards,
Diego
> Thanks again.
Diego
Sent from my cell
On Aug 15, 2011 6:43 PM, "Kevin" <kevin...@gmail.com> wrote:
>
>
>
> My current implementation is this [1], I feel that to use the
> swappable I need, three defs [2]. That is quite a bit of re-factoring.
> Please correct me if I am wrong with a cleaner solution. I will post
> the final code for public goods.
>
Hi Kevin,
Could you post a full running example? I have a few things that I would change, but it would be easier if I knew when I broke something.
It would mostly be about replacing the bind for css selectors, which are easier to read for me.
Thanks
Diego