Have an issue where files can't be uploaded via a SQLFORM.grid form that is 
loaded/ called via ajax. 

The update/ create write to the table fails. 
If a file isn't selected, and other fields are updated, the write is 
successful.

A non ajax called form works OK.

The error message following a failed update is: 
Uncaught InvalidStateError: An attempt was made to use an object that is not
, or is no longer, usable.

The following duplicates the issue:

*Model*
db.define_table('dogs', Field('dog', 'string'), format='%(dog)s')
db.define_table('fleas', Field('dog', 'reference dogs'), Field('flea_file', 
'upload'))

*Controller*
*flea_test*
db.dogs.truncate()
db.dogs.insert(dog='gus')
db.dogs.insert(dog='spot')

def dogs():
    g = SQLFORM.grid(db.dogs)
    return dict(grid=g)

def fleas():
    g = SQLFORM.grid(db.fleas)
    return dict(grid=g)

def fleas_1():
    return dict()

*Views*
*fleas_1 (the entry point)*
{{extend 'layout.html'}}
<div>
    {{=LOAD('flea_test', 'fleas', ajax=True, cid='f1')}}
</div>
(note: also occurs with *web2py_component *calls)

*fleas*
{{=grid}}


Using 2.7.4-stable+timestamp.2013.10.14.15.16.29
web2py.js, jquery.js are dated 2013-9-15

Any ideas/ pointers/ failings on my behalf?
TIA

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to