You need to sign in to do that
Don't have an account?
Salesforce development
When i am change the textbox 1 automatically that vale populate in textbox2?
hi folks,
I got one scenario. I have taken Two <apex:inputText />. When i am enter into textbox1 that value will be automatically populate in textbox2.
Can you please help me.....
thanks for helping....
try this:
VF Page :
<apex:page controller = "Test">
<script>
function populate()
{
document.getElementById('{!$Component.form1.txt2}').value = document.getElementById('{!$Component.form1.txt1}').value;
}
</script>
<apex:form id="form1">
<apex:inputText value="{!test}" onchange="populate()" id="txt1" />
<apex:inputText value="{!test2}" id="txt2" />
</apex:form>
</apex:page>
Controller:
public class Test{
public string test{set;get;}
public string test2{set;get;}
public Test() {
test = 'hai... change me';
}
}