function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
hi dear
how can i trap inputtext value in javascript
if i want to check validations on inputtext by using javascript
Find below a sample code to check and validate the inputtext in Apexinputtext and html inputtext:
<apex:page />
<apex:form>
<apex:inputtext value="{!propTextdata}" />
<input value="VKS"/>
<input value="Click Me" onclick="Validt();" />
<script>
function Validt()
{
var ApexData = document.getElementById('{!$Component.PageId:FormId:ApexTextId}').value;
var HtmlData = document.getElementById('HtmlTextId').value;
ApexData // will contain the value of Apex inputtext
HtmlData // will contain the value of HTml inputtext
}
</script>
<apex:form
</apex:page>
Check out the Visualforce docs , it has a section specifically on using JS in Visualforce. Link
thank you very much
Find below a sample code to check and validate the inputtext in Apexinputtext and html inputtext:
<apex:page />
<apex:form>
<apex:inputtext value="{!propTextdata}" />
<input value="VKS"/>
<input value="Click Me" onclick="Validt();" />
<script>
function Validt()
{
var ApexData = document.getElementById('{!$Component.PageId:FormId:ApexTextId}').value;
var HtmlData = document.getElementById('HtmlTextId').value;
ApexData // will contain the value of Apex inputtext
HtmlData // will contain the value of HTml inputtext
}
</script>
<apex:form
</apex:page>
All Answers
Check out the Visualforce docs , it has a section specifically on using JS in Visualforce. Link
Find below a sample code to check and validate the inputtext in Apexinputtext and html inputtext:
<apex:page />
<apex:form>
<apex:inputtext value="{!propTextdata}" />
<input value="VKS"/>
<input value="Click Me" onclick="Validt();" />
<script>
function Validt()
{
var ApexData = document.getElementById('{!$Component.PageId:FormId:ApexTextId}').value;
var HtmlData = document.getElementById('HtmlTextId').value;
ApexData // will contain the value of Apex inputtext
HtmlData // will contain the value of HTml inputtext
}
</script>
<apex:form
</apex:page>
thank you very much