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
开发商开发商 

Can a custom link in the Salesforce1 app target/open the device browser?

I'm looking for a way to link out of the salesforce1 app and open the device browser. Somthing similar to openURLmethod of UIApplication. I have tried <a href and window.open and each behave differently inside salesforce1. The link will originate on a VF page. Any ideas?
Sonam_SFDCSonam_SFDC
When you tried window.open in the VF code - the browser window opens inside the Salesoforce1 app and on the page footer you get the option to open the same window using the default mobile browser -(when I tested my code it wad the Safari browser) does that suit your requirement ?
LinThawLinThaw
Is this problem solved?
Is it possible to open url directly in Safari on device salesforce1?
I tried following scripts but it still stunk.
Anyone have some ideas...?

e.g.

<apex:page >
    <script type="text/javascript">
    function openInNewWindow1(){
        var newwindow = window.open('https://www.google.com','_system');
        newwindow.focus();
    }
   
    function openInNewWindow2(){
        var newwindow = window.open('https://www.google.com', '_blank');
        newwindow.focus();
    }
    function openInNewWindow3(){
        var newwindow = window.open('https://www.google.com', 'random_string');
        newwindow.focus();
    } 
   
  function openInNewWindow4()
  {
        var newwindow = window.open('https://www.google.com', '_new');
        newwindow.focus();
  }         
    </script>
   
    <apex:pageBlock >
        <apex:pageBlockSection columns="8" title="OPEN GOOGLE">     
            <apex:panelGrid columns="1">
                <apex:outputlink onclick="openInNewWindow1()">testOpenGoogle1</apex:outputlink>
            </apex:panelGrid>
            <apex:panelGrid columns="2">
                <apex:outputlink onclick="openInNewWindow2()">testOpenGoogle2</apex:outputlink>
            </apex:panelGrid>  
            <apex:panelGrid columns="3">
                <apex:outputLink onclick="openInNewWindow3()">testOpenGoogle3 </apex:outputLink>
            </apex:panelGrid>     
            <apex:panelGrid columns="4">
                <apex:outputLink onclick="openInNewWindow4()">testOpenGoogle4</apex:outputLink>
            </apex:panelGrid>          
            <apex:panelGrid columns="5">
                <apex:outputlink target="_blank" value="https://www.google.com" >testOpenGoogle5</apex:outputlink>
            </apex:panelGrid>             
            <apex:panelGrid columns="6">
                <apex:outputLink value="https://www.google.com" target="_blank">testOpenGoogle6</apex:outputLink>
            </apex:panelGrid>           
            <apex:panelGrid columns="7">
                <apex:outputlink onclick="sforce.one.navigateToURL('https://www.google.com')">testOpenGoogle7</apex:outputlink>
            </apex:panelGrid>            
            <apex:panelGrid columns="8">
                <apex:outputLink value="https://www.google.com" target="_system">testOpenGoogle8</apex:outputLink>
            </apex:panelGrid>             
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>