[web2py] Ajax function

2013-11-13 Thread Luca Dalla Palma

Hello,
this is my *view*


on the *controller *I build a function containing the folowing code:

pippone='ciao'
stringa.append("jQuery('#paginatore').html('%s');" % pippone())
print pippone
return stringa

The console says
ciao
(the HTML generated appears to be right)

When the function returns, I expect the new anchor to appear in the 
"paginatore" div, but it doesn't. Anybody can suggest me why?

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Alias on Fields

2013-10-25 Thread Luca Dalla Palma
Hello Sirs,
I access a customer Db with two tables as follows:

db.define_table('events',
Field('event_id', type='integer'),
primarykey=['event_id'])

db.define_table('documents',
Field('document_id'),
Field('event_id', 'reference events')
primarykey=['document_id'])

I would like to left join together. If I use the following expression:

rows = db(db.events.event_id==db.documents.event_id).select()

I obtain the following error=ORA-00918: column ambiguously defined
Is there a way to alias one of the two "event_id" fileds in order to make 
the join to work?

Thank you, best regards.

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.