Skip to main content

onclick="return confirm('Wanna send a mail?');"

If you return a false onclick the method will not be called. The confirm function returns true or false (OK or Cancel).

/////////----------------------------------------///////

Display Type : Detail Page Button

Behavior : Execute Javascript

Content Source : Onclick Javascript

and in the text box copy the below JS code ,

{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} var x; if (confirm("Wanna send a mail!") == true) { x = "YES"; } else { x = "NO"; } if(x == 'NO'){ window.location.replace('/{!Account.Id}') }

else { window.location.replace('/apex/AccountDetail?id={!Account.Id}') //replace your VF page here }

{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} var x; if (confirm("Wanna send a mail!") == true) { x = "YES"; } else { x = "NO"; } if(x == 'NO'){ window.location.replace('/{!Account.Id}') } else { window.location.replace('/apex/AccountDetail?id={!Account.Id}') //replace your VF page here } 

onclick="return confirm('Wanna send a mail?');"

If you return a false onclick the method will not be called. The confirm function returns true or false (OK or Cancel).

/////////----------------------------------------///////

Display Type : Detail Page Button

Behavior : Execute Javascript

Content Source : Onclick Javascript

and in the text box copy the below JS code ,

{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} var x; if (confirm("Wanna send a mail!") == true) { x = "YES"; } else { x = "NO"; } if(x == 'NO'){ window.location.replace('/{!Account.Id}') }

else { window.location.replace('/apex/AccountDetail?id={!Account.Id}') //replace your VF page here }

onclick="return confirm('Wanna send a mail?');"

If you return a false onclick the method will not be called. The confirm function returns true or false (OK or Cancel).

/////////----------------------------------------///////

Display Type : Detail Page Button

Behavior : Execute Javascript

Content Source : Onclick Javascript

and in the text box copy the below JS code ,

{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} var x; if (confirm("Wanna send a mail!") == true) { x = "YES"; } else { x = "NO"; } if(x == 'NO'){ window.location.replace('/{!Account.Id}') } else { window.location.replace('/apex/AccountDetail?id={!Account.Id}') //replace your VF page here } 
added 124 characters in body
Source Link
Amit Jain
  • 331
  • 3
  • 9

onclick="return confirm('Wanna send a mail?');"

If you return a false onclick the method will not be called. The confirm function returns true or false (OK or Cancel).

/////////----------------------------------------///////

Display Type : Detail Page Button

Behavior : Execute Javascript

Content Source : Onclick Javascript

and in the text box copy the below JS code ,

{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} var x; if (confirm("Wanna send a mail!") == true) { x = "YES"; } else { x = "NO"; } if(x == 'NO'){ window.location.replace('/{!Account.Id}') }

else { window.location.replace('/apex/AccountDetail?id={!Account.Id}') //replace your VF page here }

onclick="return confirm('Wanna send a mail?');"

If you return a false onclick the method will not be called. The confirm function returns true or false (OK or Cancel).

onclick="return confirm('Wanna send a mail?');"

If you return a false onclick the method will not be called. The confirm function returns true or false (OK or Cancel).

/////////----------------------------------------///////

Display Type : Detail Page Button

Behavior : Execute Javascript

Content Source : Onclick Javascript

and in the text box copy the below JS code ,

{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} var x; if (confirm("Wanna send a mail!") == true) { x = "YES"; } else { x = "NO"; } if(x == 'NO'){ window.location.replace('/{!Account.Id}') }

else { window.location.replace('/apex/AccountDetail?id={!Account.Id}') //replace your VF page here }

added 124 characters in body
Source Link
Amit Jain
  • 331
  • 3
  • 9

onclick="return confirm('Wanna send a mail?');"

If you return a false onclick the method will not be called. The confirm function returns true or false (OK or Cancel).

onclick="return confirm('Wanna send a mail?');"

onclick="return confirm('Wanna send a mail?');"

If you return a false onclick the method will not be called. The confirm function returns true or false (OK or Cancel).

Source Link
Amit Jain
  • 331
  • 3
  • 9
Loading