View Single Post
Old 09-24-2012, 10:18 PM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,542
Thanks: 62
Thanked 4,054 Times in 4,023 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Code makes no sense.

Code:
window.close(); // the CURRENT WINDOW is now closed...NO OTHER CODE can use the current window

// so this next line is meaningless, since the current window no longer exists.
window.location='index.php?module=Patient_Procedure&action=genMFGPO'&pomode=create&kindofpo=Z';

// this next code might work, but it might not...
// ...because once the current window is closed where is the JS code supposed to be working?
window.open(\'index.php?module=Patient_Procedure&action=genMFGPO&pomode=preview','poverifywin','width=1250,height=1000,status=0,resizable=1,scrollbars=1,toolbar=0,menubar=0,location=0')
If you want to close the current popup, that must be the *LAST* thing you do.

But what I don't understand is where the PDF file you say the middle statement opens is supposed to go if you are (a) trying to put it into the current window [which is what window.location will do] and (b) trying to close the current window.

That just makes no sense, at all.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote