On Standard detail page I have custom button with execute javascript functionality, based on the condition true the button want opens a jQuery popup with another VF page and the condition false the button will open the Direct Visual force page. Please some one help me on this issue.

1 Answer 1


You can do something like this as the javascript for the button. Just change the condition, apexpages, Ttitle,etc in what you want.

if ({!Account.Phone}=='123') {
} else {

It's pretty much self explanatory. If you want to use jquery, that is a different story, but I don't see why you would need that. Maybe you have some requirements that warrants the use of jQuery?

  • Thanks you so much, your suggestion is great but I am using jQuery popup,
    – raghusfdc
    Oct 30, 2013 at 7:43
  • Yes I have a requirements that I should use the jQuery for very nice UI and also freez the background.
    – raghusfdc
    Oct 30, 2013 at 7:45

You must log in to answer this question.

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