This is the first Visualforce page I am creating, so this might be a very simple question.
Previously I had a custom button on a custom object and I set behaviour to "execute javascript" and content source to "onclick javascript".
The code I was running was (returns Text)
{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}
sforce.apex.execute("NotificationsWebservice","sendAnEmail", {diseaseId:"{!Disease__c.Id}"});
window.alert("Email was sent." );
So now I decided to create a Visualforce page which contains a button.
<apex:commandButton action="JAVA SCRIPT NEEDS TO GO HERE I THINK" value = "Send an email"/>
The question now is, how do I call a class by pressing a button on a Visualforce page?
Thanks in advance.