+ Start a Discussion
VisualForceVisualForce 

PDF problem opening in NEW window (Urgent)

Hi..
     I have a problem in generating PDF..
     I have to generate PDF for Account object when PDF_generate__c custom filed ==Unchecked(Checkbox) otherwise I have to show some alert message  " PDF already generated"
       This is my requirement
 I am using one custom button
         Behavior                 - Execute JavaScript
         Display Type           - Detail Page Button
         OnClick JavaScript  -
                                  if({!Account.PDF_generate__c}==true)
                                  {
                                          alert("PDF already generated");
                                  } 
                                  else
                                  {
                                          window.open('/apex/Report?id={!Account.Id}');
                                  }
Its work fine in logic
My problem is
   when I using IE its opening a blank page and generate PDF when a condition satisfy otherwise its show the alert message...
     When I using firefox PDF opens in a next tab and alert message comes perfectly..
I need
    IE -- Avoid blank window ( If its possible)
    Fifrefox -- I need to opening a PDF in new window ( **** Its importnant (urgent) ****)
How to achive  my requirements.. Alert and new window PDF is essenital...
Give some solution for it..
         
dchasmandchasman
For the FF part of this specify a window name and one or more attributes like this:

window.open("/apex/Report?id={!Account.Id}", "pdfDisplay", "resizable=true");

VisualForceVisualForce

Thank you very much..

Its work fine in Firefox

Thanks once again..

But still I am getting a blank white window in IE..

 

hisrinuhisrinu
<apex:image url="{!$Resource.img}" width="220" height="55"/>


Message Edited by hisrinu on 11-24-2008 01:27 AM