David,

Thanks for your on-going support! From the looks of your example, i'm
guessing that if i want to subsequently call some JavaScript to provide
visual feedback of the server-side behavior i do something more interesting
than the " js.JsCmds.Noop" in your code. However, i can't see exactly what i
should do. i went looking at the repo and found a comment to the effect

/**
>  * JavaScript Expressions. To see these in action, check out
>  * sites/example/src/webapp/json.html
>  */
>

But that doesn't seem to exist in the repo. At least when i browse to
sites/example/src/ it contains nothing.

If you can just point me at some examples, i can probably work out most of
what i need.

Best wishes,

--greg

On Thu, Feb 12, 2009 at 9:23 AM, David Pollak <feeder.of.the.be...@gmail.com
> wrote:

>
>
> On Thu, Feb 12, 2009 at 9:08 AM, Meredith Gregory <
> lgreg.mered...@gmail.com> wrote:
>
>> Lifted,
>>
>> Suppose i've got the following fragment of lift tags
>>
>> <lift:surround with="default" at="content">
>>   <!-- Begin Easy Widgets plugin HTML markup -->
>>
>>   <div>
>>
>>    <a onclick="AddWidget('widget1.html'); return false"
>>     href="#" title="Add an activity" align="right">+ Create an
>> activity</a>
>>
>>   </div>
>>   ...
>> </lift:surround>
>>
>> and i want the onclick to call into a lift snippet instead of my jQuery
>> function, AddWidget, as it does above. How would i rewrite the anchor tag?
>
>
> Do you want the onclick to invoke a function on the server when the <a> is
> clicked?
>
> If so:
>
> SHtml.a(() => {println("Somebody clicked the link"); js.JsCmds.Noop},
> Text("Create an activity"))
>
> Should do the trick.  You can put whatever you want in the function.
>
>
>>
>>
>> Best wishes,
>>
>> --greg
>>
>> --
>> L.G. Meredith
>> Managing Partner
>> Biosimilarity LLC
>> 806 55th St NE
>> Seattle, WA 98105
>>
>> +1 206.650.3740
>>
>> http://biosimilarity.blogspot.com
>>
>>
>>
>
>
> --
> 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
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to