You need to sign in to do that
Don't have an account?
Chinnoy
Help me on this Test Class..
VF Page:
<apex:page controller="AccountController1" id="pg" >
<apex:form id="form">
<apex:pageBlock title="Recent Accounts" id="pbs">
Name: <apex:inputField value="{!Account.name}" id="name"/>
<br></br>
phone: <apex:inputField value="{!Account.phone}" id="phone" />
<br></br>
<apex:commandButton value="save" action="{!save}"/>
</apex:pageBlock>
<apex:pageBlock >
Name:<apex:outputField value="{!Account.name}" id="o1"/>
<br></br>
phone:<apex:outputField value="{!Account.phone}" id="o2"/>
</apex:pageBlock>
</apex:form>
<script>
document.getElementById(pg:form:pbs:01:o2).value= document.getElementById(pg:form:pbs:name:phone).value;
</script>
</apex:page>
Controller:
public without sharing class AccountController1 {
public Account account{get; set;}
public AccountController1(){
account = new Account();
}
public void save(){
upsert account;
}
}
PLease help me on this...
<apex:page controller="AccountController1" id="pg" >
<apex:form id="form">
<apex:pageBlock title="Recent Accounts" id="pbs">
Name: <apex:inputField value="{!Account.name}" id="name"/>
<br></br>
phone: <apex:inputField value="{!Account.phone}" id="phone" />
<br></br>
<apex:commandButton value="save" action="{!save}"/>
</apex:pageBlock>
<apex:pageBlock >
Name:<apex:outputField value="{!Account.name}" id="o1"/>
<br></br>
phone:<apex:outputField value="{!Account.phone}" id="o2"/>
</apex:pageBlock>
</apex:form>
<script>
document.getElementById(pg:form:pbs:01:o2).value= document.getElementById(pg:form:pbs:name:phone).value;
</script>
</apex:page>
Controller:
public without sharing class AccountController1 {
public Account account{get; set;}
public AccountController1(){
account = new Account();
}
public void save(){
upsert account;
}
}
PLease help me on this...
Here is your test class code :
Please mark this question as solved if this answers your question so that others can view it as proper solution.
Thanks,
Apoorv