You need to sign in to do that
Don't have an account?
Auto Complete Functionality with action function
Hi Folks ,
I am using Auto complete functionality for lookup. It is working fine, but after selecting the searched dropdown list record value which event will fire? I used onchange function not working[if i use onpress or onclick it will not work because of i am disabling enter function through script(see below)]. Already i tried different events like onselect etc. with out using Auto complete Onchange function working fine . Using onchnage mehod i am getting some values from controller based on account lookup value.
<script> function noenter(ev)
{
if (window.event && window.event.keyCode == 13 || ev.which == 13)
{
var ele=document.getElementById(cl);
ele.click();
return false;
}
else
{
return true;
}
}
</script>
<apex:inputField value="{!m.Account__c}" onkeypress="return noenter(event);" onchange="test()" id="acc">
<c:autoCompleteController objectname="Account" additionalfield="TickerSymbol" autocomplete_textbox="{!$Component.acc}" />
<apex:actionFunction name="test" action="{!sample}" reRender="pb1">
<apex:param value="{!m.Account__c}" name="ac"/>
</apex:actionFunction>
</apex:inputfield>
plase suggest on this..........................................................................
thanks
Krish
Try this
Hi,
thanks for reply,
but i tried with your code its not working fine. and another one is the auto complete not working for product object. do u have any idea. please find below code.
<apex:inputField value="{!a.Product__c}" onkeypress="return noenter(event);" id="prod"><c:autoCompleteController objectname="Product2" additionalfield="TickerSymbol" autocomplete_textbox="{!$Component.prod}" /></apex:inputField>
thank you very much.
krish
Let me give you the link on how i implemented Autocomplete controller in my org.
http://boards.developerforce.com/t5/Visualforce-Development/Visual-Force-Auto-Complete-Component/td-p/86116
this post helped me to comeup with autocomplete controller for City field on a visualforce page.
Hope the above link will help you too.