would you pst a web2pyslice about this?

On Feb 15, 3:56 am, selecta <[email protected]> wrote:
> ok already fixed it by usinghttp://jquery.malsup.com/form/
>
> in web2py_ajax.html at the top i added
> response.files.insert(3,URL(r=request,c='static',f='jquery.form.js'))
>
> and replaced form.serialize() in web2py_trap_form with
> web2py_ajax_page('post',action,form.formSerialize(),target);
>
> maybe this should always be done this way
>
> On Feb 15, 10:44 am, selecta <[email protected]> wrote:
>
> > my view:
> > {{=LOAD('default','upload_doc',ajax=True,)}}
>
> > my controller:
> > def upload_doc():
> >     print 'vars ',request.vars.keys()
> >     form = form_factory(Field('sbmlfile','upload',
> > requires=IS_NOT_EMPTY(), label='SBML file'))
> >     if form.accepts(request.vars, session):
> >         if not request.vars.sbmlfile.filename in [doc['name'] for doc
> > in session.docs]:
> >             session.docs.append( dict(name =
> > request.vars.sbmlfile.filename, content =
> > request.vars.sbmlfile.file.read()))
> >     return form
>
> > the upload works if i call the controller 
> > directlyhttp://127.0.0.1:8000/test/default/upload_doc
> > but fails with the LOAD - all I see from the print in the controller
> > is
> > vars  ['_formkey', '_formname']
>
> > guess this has something to do with form.serialize() in
> > web2py_trap_form but this is currently beyond my knowledge

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to