+ Start a Discussion
MarkInAtlantaMarkInAtlanta 

outputlink value= versus outputlink onclick window.open

so I have a complex page -  multiple tabs,  custom grid/table styled interface.   Navigation is tricky, and the business team gets freaked out if any of it changes..   It also runs in both the Service Console and in the standard interface..  

There is a product column in the table, and it needs to open a link to the product object in a new window when you click on it.  

To do this, I used an outputlink value=  to get there and it worked well in standard SF but not so well in the Service Console. 

Reading thru this forum - I switched to an outputlink using an onclick window.open. Now both paths work (standard and service console), but there are other differences . 

The most annoying..  the original page has 2 tabs (add & edit) and using ouputlink value=  when on the 2nd tab, when you go back to the original page it is the same place where you were when you clicked the link, but using window.open it goes back to the goes back to the default view of first tab having focus (not the 2nd..)  

 

So here are my 2 outputlinks -    

<apex:outputlink value="MYURL" target="_blank">{!r.caseProduct.Product__r.ProductCode}</apex:outputlink> 

<apex:outputlink onclick="window.open('MYURL', '_blank' )">{!r.caseProduct.Product__r.ProductCode}</apex:outputlink>                                

why does the starting point change when i use the window.open versus the value=  method?  

any ideas on how to get around this?  




MarkInAtlantaMarkInAtlanta
OK, more annoyances..  was working in chrome and it appreared to be functional other than the focus, but testing in IE is not workable using the window.open..    something else going on here..