5

I can't navigate to a visualforce page from a mobile card, on click any of these links it opens the same mobile card page in full size. here is simplified source of the page used as mobile card:

<apex:page standardController="Contact" showHeader="false" standardStylesheets="false" sidebar="false">
    <a target="_parent/_top/tried all of them" href="{!URLFOR($Page.SomeVFPage)}">Href link</a>
    <br/>
    <a href="#" onclick="sforce.one.navigateToURL('{!URLFOR($Page.SomeVFPage)}')">S1 navigateToURL full</a>
    <br/>
    <a href="#" onclick="sforce.one.navigateToURL('/apex/SomeVFPage')">S1 navigateToURL partial</a>
    <br/>

1 Answer 1

2

This is because the <article> element that contains the Visualforce card has an onclick handler for the entire card that takes you to the full size card. You may be able to workaround this by stopping the event propagation if your handler is called prior to the article element's handler.

You can read more about event propagation and how to stop it for modern browsers at:

https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Examples#Example_5:_Event_Propagation

1
  • Great - I will try and revert back here. Jul 15, 2014 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.