function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SteveMTCSteveMTC 

onblur and onmouseout stop working after Lookup pop up

Hi All

 

I have a lookup inputField on a vf page and want an operation to run after the user selects a value. To do this I have added an actionFunction that calls the controller operation and this is referenced on the onblur and onmouseout attributes of the inputField as onchange does not work for lookup fields. This works fine on the page load (i.e. I can see requests being sent to the server when the onblur and onmouseout events occurs), but once I've opened the lookup pop up to select a record, the events stop happening, even on different elements.

 

Can anyone shed some light on why this is happening, or offer a better solution for running an operation after a user selects a record in a lookup field?

 

Thanks

 

Steve

Pradeep_NavatarPradeep_Navatar

Go through the sample code given below :

 

            <apex:inputField value="{!vol.Organization_Served__c}" id="mo"/>

            <script>

                    function check1to4m()

                    {

                     alert('hi');

                     alert('>>>>>>>>'  +  document.getElementById("pageid:formid:pgblockid:j_id0:mo").value);

                     }

                </script>