[web2py] Re: How can I open a temporary PDF in a new tab

2014-04-24 Thread csavorgn
I managed to put the link in the SQLFORM.factory, but I don't manage to use the form validation. The reason is that "start"and "end"must be defined when the html page is created (to put their values in "button"). Is this correct or am I missing something? Thanks Carlo On Thursday, April 24, 201

[web2py] Re: How can I open a temporary PDF in a new tab

2014-04-24 Thread Oli
Am Mittwoch, 23. April 2014 15:55:50 UTC+2 schrieb csavorgn: > > Hi everyone, > I'm using a SQLFORM.factory to get the data I need to generate a PDF file > using ReportLab. > I'm using a submit button to check for the data entered and to open a new > page using redirect: > > redirect(URL("defau

[web2py] Re: How can I open a temporary PDF in a new tab

2014-04-24 Thread Oli
*example with a button. You can put the button in SQLFORM.factory:* def index(): # in an new tab # *_target='_blank'* *# set start and end for example with SQLFORM.factory* button = A('create a pdf-report in an new tab', _class="btn" , _title=T("create PDF-report"), _href=U

[web2py] Re: How can I open a temporary PDF in a new tab

2014-04-23 Thread csavorgn
Would there be a way to do what I explained if I give up using the SQLFORM.factory? How could I validate my form using e.g. JavaScript? On Wednesday, April 23, 2014 3:55:50 PM UTC+2, csavorgn wrote: > > Hi everyone, > I'm using a SQLFORM.factory to get the data I need to generate a PDF file > us

[web2py] Re: How can I open a temporary PDF in a new tab

2014-04-23 Thread csavorgn
I tried to use your code (with the obvious modifications) but I can't really figure out how to use it... Could you better explain your solution? Thanks Carlo On Wednesday, April 23, 2014 4:00:26 PM UTC+2, Oli wrote: > > > URL('Link for a new tab', _class="btn" , _title=T("in a new tab"), > _h

[web2py] Re: How can I open a temporary PDF in a new tab

2014-04-23 Thread Oli
URL('Link for a new tab', _class="btn" , _title=T("in a new tab"), _href=URL("default","yourcontroller",args=[*row.id* ]), *_target='_blank'*) Am Mittwoch, 23. April 2014 15:55:50 UTC+2 schrieb csavorgn: > Hi everyone, > I'm using a SQLFORM.factory to get the data I need to ge