Does the commandButton have anything similar to a target attribute for outputLink? I am needing such a thing because I have a visualforce page that is inline or an iFrame for an Account or Contact page. Here is what my commandButton looks like at the moment
<apex:commandButton onclick="window.location.href='{!URLFOR($Action.Relationship_Detail__c.View, selectedDetail)}'" value="View" immediate="true" rendered="{!IF(BEGINS(selectedId, '00'), true, false)}" rerender="blank"/>
Again this commandButton works for the iFrame but I need it to redirect the entire window it is on.
Best Answer
No. Command buttons are meant for actions on controllers. You have 2 options:
1) You can specify the target on the window.open javascript method.
2) You can use styling to make the outputLink appear like a button.