You need to sign in to do that
Don't have an account?
Commandbutton Onclick Javascript does not work with Development Mode disabled
Hi all,
I have a commandbutton with the following onclick event...
onclick="window.parent.location.href='https://c.eu3.visual.force.com/apex/GRPHotProjectSummary_Edit?scontrolCaching=1&id={!Opportunity.ID}'"
....to redirect to another VF page called 'GRPHotProjectSummary_Edit'.
When I tested it everything worked fine.
However, when other users who do not have 'Development Mode' enabled in their user details nothing happen - the original page just refreshes.
Any suggestions how to change the onclick event?
Ideally I don't want to write a custom controller (and wouldn't know how) for just linking to another VF page.
Or do we need to enable development mode for all users in our Org?
many thanks!
You do not want to embed a Salesforce URL into any code. Although this may be why this is working for you but not others, it will definitly break your code once you move the code from a sandbox to production. You can probably use URLFOR() instead. See the Functions section in the appendix of the Visualforce development quide.
May be you have to stop the defaul action ? Since defaul command button behaviour is submit the page.
Note : Please use relative URLs, your link may not work after migration to other environment/productin