_onclick expects a javascript fragment to be executed.
On Monday, November 19, 2012 2:40:24 PM UTC+1, Amit wrote:
>
> Hi,
> I have added one custom button after *Search* and *Clear* buttons of
> SQLFORM.grid but unable to associate the action onto it, onclick is not
> getting called.Please see
Could you elaborate more on this with some example code?
On Monday, 19 November 2012 19:13:58 UTC+5:30, Niphlod wrote:
>
> _onclick expects a javascript fragment to be executed.
>
> On Monday, November 19, 2012 2:40:24 PM UTC+1, Amit wrote:
>>
>> Hi,
>> I have added one custom button after *Searc
the _onclick parameter is "translated" to just a plain onclick attribute of
the tag you're using.
When you do in HTML mylink nothing will
happen.
an _onclick of "alert('clicked me')" will fire an alert box (language:
javascript).
What do you need to do upon clicking that button ?
--
upon clicking the button , I need to make query to db and delete the
records...
On Monday, 19 November 2012 19:23:54 UTC+5:30, Niphlod wrote:
>
> the _onclick parameter is "translated" to just a plain onclick attribute
> of the tag you're using.
>
> When you do in HTML mylink nothing will
> hap
now you're the one that needs explaining it further :P
I assume that just going to the "test" function and return back would not
be enough ? (i.e. a simple _href=URL('test') on that button)
On Monday, November 19, 2012 2:56:36 PM UTC+1, Amit wrote:
>
> upon clicking the button , I need to make qu
I simply have to delete the records from the table, but problem what I am
facing is : if the function would not be get called then how will I achieve
this?
On Monday, 19 November 2012 19:31:53 UTC+5:30, Niphlod wrote:
>
> now you're the one that needs explaining it further :P
> I assume that jus
all the records ?
if you need to execurte your "test()" function you just need the browser to
"go" to that page. Let's assume that in your controller you have
def index():
grid = grid(db.testtable)
grid[0][1][1].components = [
TAG.button('testbutton', _id="px-delete",_type="butt
whoopsy, did you try with a simple A instead of a button ?
TAG.a('Delete',_id="px-delete",_type="button",_href=URL('test'))
On Tuesday, November 20, 2012 6:27:18 AM UTC+1, Amit wrote:
>
> Thanks Niphold for sharing the example code, but still it is not working
> means upon clicking on the "Delet
If I use A instead of button then its calling perfectly but i have to show
Delete as a button not as a link.
Second observation: if I am adding Delete button/link beside Search and
Clear button, and if I click Query input field, its not showing query
filling fields(drop down menu,conditional fields
On Tuesday, November 20, 2012 10:19:25 AM UTC+1, Amit wrote:
>
> If I use A instead of button then its calling perfectly but i have to show
> Delete as a button not as a link.
>
Style the A as a button. With bootstrap's included just add a class = btn .
> Second observation: if I am adding D
Thanks Niphold :), Now its working fineyeah I do agree that I am not so
good in Javascript as I am having very less experience on web
development..but I am very sure that with the guidance of you people I will
definitely learn it fast :).
On Tue, Nov 20, 2012 at 4:33 PM, Niphlod wrote:
>
>
11 matches
Mail list logo