function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ssssssss 

Is it possible to generate a new window in visualforce page

Hi Everybody,

 

Is it possible to genrate a new window in visualforcepage or VF with apex.If possible tell me the code.

 

Thanks,

Manu...

metaforcemetaforce
Did you try using window.open in JavaScript on your VF page?
SteveBowerSteveBower

On an <apex:commandLink> tag you can use the 'target="_blank"' parameter which will open on a new page.

 

Best, Steve.

ssssssss

Thanks for ur reply,

 

Yes i had used window.open using java script.Through java script i thougt that we cant connect the back end.Thats why i am using apex.

 

In my application CAFCharge is having 3 fileds.Charges Head,Description  of Charges,Percentage.I have to place Search button beside Charges Head field.In New(button) mode When i click on Serach button i want to display one window and capture the all these three field values.If i select one field it is automatically populate these three values to the corresponding fields(like lookup in salesforce).In the new window i want to disable the minimize and maximize buttons.This is my requirement.

 

Plz help me with the code.

 

My code is as follows.

 

<apex:page standardcontroller="CAF_Charge__c" extensions="cafcharge2" >
  <html>
    <head>
       <title>CAF Charge Detail</title>
    </head>
      <body bgcolor="000066">
         <font color="#8A4B08" size="4"><h1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CAF Charge Detail </h1></font>
      </body>
  </html>    
      <br/>
      <br/>
      <br/>
 
 <apex:form >
 <table>
 <tr>
    <td>
      <apex:outputlabel value="Charges Head">
      </apex:outputlabel>
    </td>
 
    <td>
      <apex:inputField id="ufield" value="{!CAF_Charge__c.Charges_Head__c}"/>
    </td>
    <td>
     <apex:commandButton value="Search" />
    </td>
    </tr>
 

<tr>
    <td>
       <apex:outputlabel value="Description Of Charges">
       </apex:outputlabel>
    </td>
    <td>
       <apex:inputField value="{!CAF_Charge__c.Description_Of_Charges__c}"/>
    </td>
</tr>
<tr>
    <td>
      <apex:outputlabel value="Percentage">
      </apex:outputlabel>
    </td>
    <td>
      <apex:inputField value="{!CAF_Charge__c.Percentage__c}"/>
    </td>
</tr>
<tr>
   <td>
    <apex:commandButton action="{!save}" value="Save"  />
    <apex:commandButton  value="New"  />
   </td>
</tr> 
</table>
 
 </apex:form>
</apex:page>

 

Thanks in advance,

Manu..