I solved in this way

form[0][-1][1].append(TAG.BUTTON('Annulla', _class='btn btn-default', 
_type='Cancel',_onclick="document.location='%s';return false" % 
URL('lista_ticket_asset',args=tipo_asset)))

Thank you the same.

Il giorno lunedì 29 gennaio 2018 17:23:14 UTC+1, Anthony ha scritto:
>
> Rather than simply saying something is "not working," it always helps to 
> explain exactly what you expect and what you see instead. Does the 
> generaged HTML look correct, but the onclick behavior is not as expected? 
> Are you getting an error? We need more details.
>
> On Monday, January 29, 2018 at 11:17:24 AM UTC-5, Andrea Fae' wrote:
>>
>> If I write this for testing
>>
>> form[0][-1][1].append(TAG.BUTTON('Annulla', _class='btn btn-default', 
>> _type='Cancel',_onclick="document.location='%s';return false" % 
>> URL('lista_ticket_asset/SC')))
>>     
>> it's not woking too.
>>
>> Il giorno lunedì 29 gennaio 2018 17:09:07 UTC+1, Andrea Fae' ha scritto:
>>>
>>>
>>> Hello, in a controller this is working
>>>
>>> form[0][-1][1].append(TAG.BUTTON('Annulla', _class='btn btn-default', 
>>> _type='Cancel',_onclick="document.location='%s';return false" % 
>>> URL('index')))
>>>     
>>> and the landing page is default\index
>>>
>>> this is not working
>>>
>>> form[0][-1][1].append(TAG.BUTTON('Annulla', _class='btn btn-default', 
>>> _type='Cancel',_onclick="document.location='%s';return false" % 
>>> URL('lista_ticket_asset', args=[tipo_asset])))
>>>
>>> tipo_asset is a string (like 'MO', 'SC', etc) and I'd like to go to the 
>>> landing page like
>>>
>>> default\lista_ticket_asset\MO or default\lista_ticket_asset\SC etc...
>>>
>>> Thanks 
>>>
>>

-- 
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.

Reply via email to