Again, can't help without code or knowing what you are trying to do. The
button probably works fine, but you must be more clear about what you are
trying to achieve. If you simply want the button to act as a link, then
make it a link instead -- no need for the Ajax call (note that Ajax calls
by their nature are not intended to load a new page in the browser). Also,
note that client_side is not an argument of the ajax() function.
Anthony
On Monday, April 18, 2016 at 11:45:16 AM UTC-4, Ron Chatterjee wrote:
>
> I understand. Just saying this button doesn't work.
>
> <button class="btn btn-primary pull-right" onclick="ajax('{{=URL('cart',
> args = 22)}}', [], 'target', client_side=True)">Shopping Cart,
> ${{=5}}</button>
>
> It doesn't redirect to anything. Looks pretty but just sits there. lol
>
>
> On Monday, April 18, 2016 at 10:54:00 AM UTC-4, Anthony wrote:
>>
>> On Monday, April 18, 2016 at 10:11:21 AM UTC-4, Ron Chatterjee wrote:
>>>
>>> On that note Anthony, why doesn't this button works?
>>>
>>> <button class="btn btn-primary pull-right" onclick="ajax('{{=URL('cart',
>>> args = 22)}}', [], 'target')">Shopping Cart, ${{=total}}</button>
>>>
>>> onclick I can apply a jquery or ajax call. The ajax call seems to be
>>> inline with what you specified but doesn't redirect.
>>>
>>
>> Hard to say without seeing the code. If you want to do a full page
>> redirect via an Ajax request, be sure to set client_side=True.
>>
>> Anthony
>>
>>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.