Now I have modified my code as you said but still not working...it is not 
redirecting

def index():
    values= ['','P2', 'P3', 'P8', 'P9', 'P10', 'P14', 'P15', 'P16', 'P17', 
'P24']
   
    protease = FORM('Select 
prot:',SELECT(values,_name='protease',_onchange="jQuery.post('%s',{'protease':jQuery(this).val()})"
 
% URL('mmp')))
    
    form=FORM(TABLE(TR('Uniprot ID:',INPUT(_name='uniprot', 
requires=IS_NOT_EMPTY())),
    TR('Enter fasta sequence:',TEXTAREA(_name='fasta', 
requires=IS_NOT_EMPTY())),
    TR('Choose PDB file:',INPUT(_type='file', _name='pdbfile', 
requires=IS_NOT_EMPTY())),
    TR('Enter PDB ID:',INPUT(_name='pdbid', requires=IS_NOT_EMPTY())),
     TR("",INPUT(_type="submit",_value="SUBMIT"))))            
    
    if form.vars.uniprot:
    #session.uniprot = form.vars.uniprot
        redirect(URL('result'))
    if form.vars.fasta:
    session.fasta = form.vars.fasta
        redirect(URL('blast_result'))
    if form.vars.pdbfile:
    session.pdbfile = form.vars.pdbfile
        redirect(URL('pdbfile_result'))
    if form.vars.pdbid:
    session.pdbid = form.vars.pdbid
        redirect(URL('pdbid_res'))

return dict(form=form, protease=protease)



On Friday, 25 October 2013 14:26:15 UTC-7, Niphlod wrote:
>
> every form must be submitted separately. You definitely can't handle the 
> situation when the user fills two forms (unless you choose to discard one 
> of them and submit just the first one) because there's no way to redirect 
> to multiple pages....
> At this point, why don't you make a single form with all the values you 
> need and then
>
> if form.vars.pdbfile:
>     ---- 
>     redirect(URL('pdbfile_result'))
> if form.vars.pdbid:
>     -----
>     redirect(URL('pdbid_res'))
> ....
> ....
> ....
>
> ?
>

-- 
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.

Reply via email to