T5: Buttons, JS popup, Ajax/Zone and ActionLink

2011-01-14 Thread Adam Zimowski
Hi I have a feeling like this is so simple and I'm missing something really obvious. I have a question on the recommended approach for a specific scenario: An HTML button showing a JS popup rendered via Ajax. Here is specific example:

Re: T5: Buttons, JS popup, Ajax/Zone and ActionLink

2011-01-14 Thread Thiago H. de Paula Figueiredo
On Fri, 14 Jan 2011 14:27:12 -0200, Adam Zimowski zimowsk...@gmail.com wrote: Hi Hi! My question is, how should I approach this? Currently, the price button invokes a JS call. So how can I call actionlink URL from a JavaScript? Every event (ActionLink triggers events) has an URL. To get

Re: T5: Buttons, JS popup, Ajax/Zone and ActionLink

2011-01-14 Thread Michael Taylor
My first thought would be to include the action link in the page somewhere, but set its style to display: none. Then your JavaScript can do something like document.location.href = document.getElementById('myActionLink').href; In the past I've done something similar to trigger a zone update from

Re: T5: Buttons, JS popup, Ajax/Zone and ActionLink

2011-01-14 Thread Adam Zimowski
Thanks Thiago! I'll take a look at these examples. @Michael - how clever !! This may be just the shortcut I needed. Adam On Fri, Jan 14, 2011 at 10:40 AM, Michael Taylor miketay...@google.com wrote: My first thought would be to include the action link in the page somewhere, but set its style

Re: T5: Buttons, JS popup, Ajax/Zone and ActionLink

2011-01-14 Thread Anna Vo
The alternative to hiding a link on the page (if you want a better separation of logic) is to pass a JSonObject with your data directly to the JavaScript method. This way if you need to you can easily pass additional data to the client for processing. So at the top of your class @Import(library =