You need to sign in to do that
Don't have an account?

Jquery not working with apex:inputField
hi
i want autocomplete functionality on lookup field.
So i wrote jquery for autocomplete.
when i tried to use in apex:inputField it is not working.
In apex:inputText it is working.But the problem is it is displaying id of the record and not the name.
When using in apex:inputField the lookup is showing like this..
[User-added image]
Code Snipprt:
<script type="text/javascript">
var jq = jQuery.noConflict();
var apexACList =[];
<apex:repeat value="{!listAC}" var="ACList">
apexACList.push('{!ACList.WS_User__r.name}');
</apex:repeat>
jq(document).ready(function(){
jq(".acautocomplete").autocomplete({
source : apexACList
});
});
<apex:inputField value="{!relList.Person__c}" styleClass="acautocomplete" />
Can anybody help me on this..
i want autocomplete functionality on lookup field.
So i wrote jquery for autocomplete.
when i tried to use in apex:inputField it is not working.
In apex:inputText it is working.But the problem is it is displaying id of the record and not the name.
When using in apex:inputField the lookup is showing like this..
[User-added image]
Code Snipprt:
<script type="text/javascript">
var jq = jQuery.noConflict();
var apexACList =[];
<apex:repeat value="{!listAC}" var="ACList">
apexACList.push('{!ACList.WS_User__r.name}');
</apex:repeat>
jq(document).ready(function(){
jq(".acautocomplete").autocomplete({
source : apexACList
});
});
<apex:inputField value="{!relList.Person__c}" styleClass="acautocomplete" />
Can anybody help me on this..
I believe you need to go for static method for the same. here i have a code snippit for you as an example.
Step 1 : Create a remote method
Step 2 : Invoke the remote method from JavaScript on Visual Force Page. eg. Step 3: Consume the result from apex:input control eg.
Hope this code snippit helps you. if this code snippit fulfill all your need. Please mark it as a best answer so people can use it for similier problem.
Thanks and regards,