I am having a custom URL field on task. I dont want to show my users the URL when I click on the field.I have created a visulaforce page that have buttons on clicking whom the URL should open in an iframe. Can anyone suggest how to achieve the same?

1 Answer 1


You can use something like this as Javascript action for the button:

<script type="text/javascript">
  function onClick()
    document.getElementById('myIframe').src = 'https://www.Salesforce.com';
<input type="button" value="Change site" onClick="onClick()" />
<iframe id="myIframe" src="https://salesforce.stackexchange.com"></iframe>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .