Still isn't working for me :'(

In my view, I have:
<div id="deltutor">{{=A('Delete Role',_class="btn 
btn-danger",_id='deltutorlink', 
callback=URL('edit_profile'),delete='#deltutor')}</div>

in my controller, under the edit_profile method, I have:

if request.vars.deltutorlink:
        response.flash = T('deltutorlink reached!')

but this response.flash is never reached. I can't figure out how to get the 
callback go to the controller and pass in the request.vars.deltutorlink as 
being clicked so that it can run the code I want...


On Saturday, December 15, 2012 7:36:34 PM UTC, Massimo Di Pierro wrote:
>
> <div id="row123">.... {{=A('delete 
> 123',callback=URL('delete',args=123),delete='#row123')}} ... </div>
>
>
> The delete argument indicates that upon success you want to remove the 
> <div id="row123">...</div> from the page. If there is a "delete" argument 
> the confirmation popup is automatic. ;-)
>
> On Saturday, 15 December 2012 11:35:28 UTC-6, Daniele wrote:
>>
>> I want to do something very simple but it's taking me eons to do this~
>>
>> When the button is clicked, I want a javascript alert to pop up that 
>> asks, are you sure? Yes/No.
>> If Yes, then run this code: auth.del_membership('role')
>>
>> No redirection, just delete the role.
>> That's all -_- this is taking me way too long....
>>
>> On Saturday, December 15, 2012 3:32:22 PM UTC, Massimo Di Pierro wrote:
>>>
>>> None. You are asking to ":eval" the result. It meas the action is 
>>> supposed to return JS
>>>
>>> def test():
>>>     return "alert('hello')"
>>>
>>> anyway, you should debug this with the JS console in chrome. We do not 
>>> know exactly how your code looks like.
>>>
>>> On Saturday, 15 December 2012 09:08:37 UTC-6, Daniele wrote:
>>>>
>>>> I am trying with:
>>>> {{=A('Delete Role', _class="btn btn-danger", _id="del_role_tutor", 
>>>> callback=URL('test'), target=":eval")}}
>>>>
>>>> and in my controller:
>>>>
>>>> def test():
>>>>     return "Hello"
>>>>
>>>> or 
>>>>
>>>> def test():
>>>>     return dict()
>>>>
>>>> but when I click the button, nothing happens. Why is this??
>>>>
>>>> On Monday, December 10, 2012 9:15:30 PM UTC, Daniele wrote:
>>>>>
>>>>> When I use form.add_button() I am able to add a button to a form, 
>>>>> which I can display with {{=form}} in my view.
>>>>>
>>>>> However, if I'm making a custom form using form.custom, how can I 
>>>>> display that button??
>>>>>
>>>>> Thanks
>>>>>
>>>>

-- 



Reply via email to