Last active
February 26, 2016 06:04
-
-
Save tyoshikawa1106/11ccca3c2e965805b1bb to your computer and use it in GitHub Desktop.
sforce.one.navigateToURLのサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page standardStylesheets="false" showHeader="false" applyHtmlTag="false" applyBodyTag="false"> | |
<head> | |
<!-- meta --> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<!-- lightning desin system --> | |
<apex:stylesheet value="{!URLFOR($Resource.SLDS0122, 'assets/styles/salesforce-lightning-design-system.css')}" /> | |
</head> | |
<body> | |
<!-- main --> | |
<div class="slds-m-around--medium"> | |
<button class="slds-button slds-button--brand" onclick="return changePage();">Next Page2</button> | |
</div> | |
<!-- javascript --> | |
<script type="text/javascript"> | |
function changePage() { | |
if( (typeof sforce != 'undefined') && (sforce != null) ) { | |
console.log('S1'); | |
sforce.one.navigateToURL('{!$Page.S1VFPage2}'); | |
} else { | |
console.log('Desktop'); | |
window.location.href = '{!$Page.S1VFPage2}'; | |
} | |
} | |
</script> | |
</body> | |
</apex:page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page standardStylesheets="false" showHeader="false" applyHtmlTag="false" applyBodyTag="false"> | |
<head> | |
<!-- meta --> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<!-- lightning desin system --> | |
<apex:stylesheet value="{!URLFOR($Resource.SLDS0122, 'assets/styles/salesforce-lightning-design-system.css')}" /> | |
</head> | |
<body> | |
<!-- main --> | |
<div class="slds-m-around--medium"> | |
<button class="slds-button slds-button--neutral" onclick="return changePage();">Back Page1</button> | |
</div> | |
<!-- javascript --> | |
<script type="text/javascript"> | |
function changePage() { | |
if( (typeof sforce != 'undefined') && (sforce != null) ) { | |
console.log('S1'); | |
sforce.one.navigateToURL('{!$Page.S1VFPage1}'); | |
} else { | |
console.log('Desktop'); | |
window.location.href = '{!$Page.S1VFPage1}'; | |
} | |
} | |
</script> | |
</body> | |
</apex:page> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment