NetTalk Central

Author Topic: Servedocument in netform embed  (Read 3491 times)

sabra

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Email
Servedocument in netform embed
« on: January 25, 2011, 01:25:59 PM »
In the postupdate embed of my netwebform i create a pdf report. Based on the condition SendByPost = true i want to show this pdf in a new page in the browser. I have the servedocument procedure working , but thats based on clicking a download button in a browse.
How can i do this on the server side ?

Best regards,

Walter

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Servedocument in netform embed
« Reply #1 on: January 25, 2011, 03:24:11 PM »
You can call servedocument from a form. You will need to change the target based on your condition. If you have Bruce's book on Nettalk there is a section on this.

sabra

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Email
Re: Servedocument in netform embed
« Reply #2 on: January 25, 2011, 10:25:41 PM »
I found out that i can use p_web._sendfile(loc:pdfname)

This however in the _self. i want _blank , otherwise my form in gone.

Cheers,


Walter

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Servedocument in netform embed
« Reply #3 on: January 25, 2011, 11:07:36 PM »
Hi Walter,

you can do some research, but I don't think the server can set the target inside the reply.
the target is set on the client side, on the URL that the user clicks on.

cheers
Bruce