On Feb 27, 6:29 pm, Massimo Di Pierro <[email protected]>
wrote:
> My mistake:
>
> {{extend 'layout.html'}}
> <div id="top">
> {{for row in rows:}}
>   <button onclick="ajax('{{=URL('callback',args=row.affirm_pkey)}}',
> [],'bottom');">{{=row.affirm_pkey}}</button>
> {{pass}}
> </div>
>
> <div id="bottom">
> </div>
>

sounds good.. {{pass}} seems to work inside or outside of <Button>
but, Button? Dont I want a list / popup menu ?
I am loading more data now..

> On Feb 27, 8:21 pm, darkblue_b <[email protected]> wrote:
>
> > well I guessed a little - and now something seems to work!
> > (more testing now)
>
> > <button onclick="ajax('{{=URL('callback',args=row.affirm_pkey)}}',
> > [],'bottom');" >{{=row.affirm_pkey}}{{pass}}</button>
>
> >    -Brian
>
> > On Feb 27, 6:06 pm, darkblue_b <[email protected]> wrote:
>
> > > On Feb 27, 5:41 pm, Massimo Di Pierro <[email protected]>
> > > wrote:
>
> > > > Here is a possible solution (typos aside):
>
> > > > def index():
> > > >     return
> > > > dict(rows=db(db.ratings_view).select(db.ratings_view.affirm_pkey,distinct=T
> > > >  rue))
>
> > > > def callback():
> > > >     return
> > > > SQLTABLE(db(db.ratings_view.affirm_pkey==request.args(0)).select())
>
> > > > and in view/default/index.html()
>
> > > > {{extend 'layout.html'}}
> > > > <div id="top">
> > > > {{for row in rows:}}
> > > > <button onclick="ajax('{{=URL('callback',args=rowaffirm_pkey)}}',
> > > > [],'bottom');">{{=row.affirm_pkey}}</button>
> > > > </div>
> > > > <div id="bottom">
> > > > </div>
>
> > > thx for the quick reply
> > > is the '>' necessary before {{=row.affirm_pkey}}   ??
> > > if it is removed, I get
> > >   "missing pass in view"
>
> > > if it is there, and I typed it in right
> > > it is simply a very long error in parse container with no msg
>
> > >   -Brian
>
> > > > On Feb 27, 6:53 pm, darkblue_b <[email protected]> wrote:
>
> > > > > Hi- maybe this is really easy and I havent found it yet..
> > > > > I now have a table defined in db.py, like so
>
> > > > > db.define_table('ratings_view',
> > > > >     Field('flat_key', type='integer'),
> > > > >     Field('rating_value', type='double'),
> > > > >     Field('category', type='text'),
> > > > >     Field('credit', type='text'),
> > > > >     Field('subcredit', type='text'),
> > > > >     Field('credit_weighting', type='integer'),
> > > > >     Field('category_weighting', type='integer'),
> > > > >     Field('subcredit_weighting', type='integer'),
> > > > >     Field('affirm_pkey', type='integer'),
> > > > >     Field('date_executed', type='date'),
> > > > >     Field('who_string', type='text'),
> > > > >     primarykey=['flat_key'],
> > > > >     migrate=migrate)  ##<- I dont know what this does yet --
>
> > > > > I want an HTML page that has two parts, a pop-up menu with a list of
> > > > > DISTINCT(affirm_pkey) at the top, and a table display below. The user
> > > > > chooses an affirm_pkey, and the display table is filled with results.
> > > > > In my case, there are always 253 rows per affirm_key. (this table
> > > > > definition is actually a VIEW defined in postgres.. it seems to work
> > > > > fine)
>
> > > > > thanks in advance  -Brian

Reply via email to