[SOLVED] new window

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

[SOLVED] new window

Post by magicrobotmonkey »

Here's my deal. I have a form that the user goes through, fills out, and submits. On the submit page, I have three links to php files which recreate various versions of the form. These open in a new window and everything works fine. Now, I need to email one of the PDF's which has been created by a php. So I have javascript open a new window onLoad which runs the same script as the one that generates the pdf, except it emails it instead. (I have to do a new window becuase fpdf generates "HEaders already sent" errors even if you are not publishing to the page!). But this new window, instead of running the script, tries to make me download it. The php file. I can't download it, because it cant find it, but it is still weird. I guess there must be a difference apache can tell between a clicked on link and a forced-to link. But anyways, any idea how I can make this go away? Or any way I can make PHP open a new window?
Last edited by magicrobotmonkey on Tue Mar 30, 2004 1:43 pm, edited 1 time in total.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

Uhh never mind, I just updated my version of FPDF and now I don't need the new window anymore!
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Re: new window

Post by ol4pr0 »

magicrobotmonkey wrote:Now, I need to email one of the PDF's which has been created by a php. So I have javascript open a new window onLoad which runs the same script as the one that generates the pdf, except it emails it instead.
Untill there i understand the whole story, however than
magicrobotmonkey wrote:But this new window, instead of running the script, tries to make me download it.
Now you have lost me ..


What are you trying to run in the new window ?

Dont think php can do the open in new window, that is javascript for as far as i know
Post Reply