Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- General Development
- :
- PageReference opens new window instead of redirect...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
PageRefere nce opens new window instead of redirectin g in internet explorer.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-18-2012 11:14 PM
Hi,
i have a custom section with a custom button on Account tab, from the section a VF page is opened as modal dialog after the custom button is clicked. On the modal dialog some records are updated and then i want to redirect to another VF page in the dialog window itself (i.e. the redirect should happen in the modal dialog itself)
the code of the VF page which is opened as modal dialog is as below -
public PageReference updateRecords()
{
// update some records
//code to redirect to another VF page after the update is done
PageReference newPage = new PageReference('/apex/UpdateResult?Message=Record Updated Successfully');
newPage.setRedirect(true);
return newPage;
}
when i execute the above code in Firefox it works fine and redirects to newPage inside the modal dialog, but in IE it opens a new window instead of redirecting when i click the button on modal dialog.
i've used "window.showModalDialog('/apex/VFPage') ;" to open modal dialog and show the VF page, and the version of internet explorer is 9.
Please provide any suggesstion on how to do this.
Thanks in Advance.

