You need to sign in to do that
Don't have an account?
Naresh Kumar Mohan Thirukkovaluru
can anyone tell me vf code & controller class code for calculator with single input text
<apex:page controller="calc" >
<apex:form >
<apex:pageBlock >
<table border="1">
<apex:inputText size="11"/>
<tr><td><apex:commandButton value="9" /></td><td><apex:commandButton value="8"/></td><td><apex:commandButton value="7"/></td><td><apex:commandButton value="/"/></td></tr>
<tr><td><apex:commandButton value="6"/></td><td><apex:commandButton value="5"/></td><td><apex:commandButton value="4"/></td><td><apex:commandButton value="*"/></td></tr>
<tr><td><apex:commandButton value="3"/></td><td><apex:commandButton value="2"/></td><td><apex:commandButton value="1"/></td><td><apex:commandButton value="+"/></td></tr>
<tr><td><apex:commandButton value="0"/></td><td><apex:commandButton value="."/></td><td><apex:commandButton value="-"/></td><td><apex:commandButton value="%"/></td></tr>
</table>
</apex:pageBlock>
</apex:form>
</apex:page>
<apex:form >
<apex:pageBlock >
<table border="1">
<apex:inputText size="11"/>
<tr><td><apex:commandButton value="9" /></td><td><apex:commandButton value="8"/></td><td><apex:commandButton value="7"/></td><td><apex:commandButton value="/"/></td></tr>
<tr><td><apex:commandButton value="6"/></td><td><apex:commandButton value="5"/></td><td><apex:commandButton value="4"/></td><td><apex:commandButton value="*"/></td></tr>
<tr><td><apex:commandButton value="3"/></td><td><apex:commandButton value="2"/></td><td><apex:commandButton value="1"/></td><td><apex:commandButton value="+"/></td></tr>
<tr><td><apex:commandButton value="0"/></td><td><apex:commandButton value="."/></td><td><apex:commandButton value="-"/></td><td><apex:commandButton value="%"/></td></tr>
</table>
</apex:pageBlock>
</apex:form>
</apex:page>
try this
page:
<apex:page controller="calc" >
<apex:form >
<apex:pageBlock >
<table border="1">
<apex:inputText size="11"/>
<tr><td><apex:commandButton value="9" /></td><td><apex:commandButton value="8"/></td><td><apex:commandButton value="7"/></td><td><apex:commandButton value="/"/></td></tr>
</table>
</apex:pageBlock>
</apex:form>
</apex:page>
class:
public with sharing class calc {
}