You need to sign in to do that
Don't have an account?
giri rockzzzz
Problem in fetching value of apex input text in javascript.....
can anyone help on this issue?????
<script>
function test()
{
var a=document.getElementById('{!$Component.r_3}').value;
}
</script>
<apex:form>
<apex:inputText value="{!revenue3}" id="r_3" />
<input value=" " onfocus="test();" />
</apex:form>
Did you try to alert and see what is shown.
Do the following,
Add id to form tag and all the parent tags of apex:inputText tag.
Then navigate from form id thorugh apex:inputText id
for ex:
<script type="text/javascript">
function test()
{
var a=document.getElementById('{!$Component.formid.r_3}').value;
}
</script>
<form id="formid">
<apex:inputText id="r3" ..... />
</form>
All Answers
Did you try to alert and see what is shown.
Do the following,
Add id to form tag and all the parent tags of apex:inputText tag.
Then navigate from form id thorugh apex:inputText id
for ex:
<script type="text/javascript">
function test()
{
var a=document.getElementById('{!$Component.formid.r_3}').value;
}
</script>
<form id="formid">
<apex:inputText id="r3" ..... />
</form>
thank you....