form=SQLFORM(Field('abc'))
form.element(_name='abc')['_onkeyup']="....."


On Oct 13, 12:12 pm, cjung89 <cjun...@gmail.com> wrote:
> Thanks, but are you sure that syntax is correct?
>
> I get:
>
> form.element(_name='abc')['_onkeyup'="ajax('bg_find', ['keyword'],
> 'target')"]
>                                     ^
> SyntaxError: invalid syntax
>
> at the second '='
>
> On Oct 12, 10:30 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > yes
>
> > form=SQLFORM(Field('abc'))
> > form.element(_name='abc')['_onkeyup'="....."
>
> > On Oct 12, 7:31 pm, cjung89 <cjun...@gmail.com> wrote:
>
> > > In the web2py book there is this function in the overview for the wiki
> > > demo:
>
> > > def search():
> > >      "an ajax wiki search page"
> > >      return dict(form=FORM(INPUT(_id='keyword',_name='keyword',
> > >               _onkeyup="ajax('bg_find', ['keyword'], 'target');")),
> > >               target_div=DIV(_id='target'))
>
> > > I was wondering if there is a way to set the onkeyup attribute for a
> > > field in a SQLFORM, since the with a SQLFORM the forms are generated
> > > from the model.
>
>

Reply via email to