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

onselect not working in firefox??

This code is working fine in IE but not working in firefox...onselect is NOT working but onclick IS working...please help!!!!

I am commenting out everything but still its not working...


<apex:pageBlockSectionItem id="theItemLookup" rendered="{!AND(Lead.Employee_Status__c=='Consultant',NOT(ISNULL(Lead.Employee_Status__c)),CONTAINS(Lead.Approved_Consulting_Company__c, 'IS&T - '))}" >   
                        <apex:outputLabel value="Work order #" for="reqWorkOrderLookup" />
                        <apex:outputPanel styleClass="requiredInput" layout="block">
                            <apex:inputField value="{!Lead.IS_T_Work_Order__c}" id="reqWorkOrderLookup" onselect="alert('hi');populateAED()" onclick="alert();"/>
                            <!-- <apex:actionFunction name="populateAED" action="{!getAED}" rerender="aed" status="reqstatus"  oncomplete="alert('done');disableAED();"/>
                            </apex:inputField> -->
                            <script> workorderLookup = document.getElementById("{!$Component.reqWorkOrderLookup}"); </script>



It works for me.  What are you trying to do?  What is the field type of Lead.IS_T_Work_Order__c?


You know that onselect is for text selection right?


Perhaps you are looking for onfocus?


It is a look up field to a custom object. I know onselect. onclick n the same field is working fine... 


It works in my test page


<apex:page standardController="account">
  <apex:form >
   <apex:inputField value="{!account.parentid}" onselect="alert('hi');"/>

 I loaded up the page, typed something into the lookup field, and then highlighted the text with my mouse, and the alert popped up.




Soo weird, onselect works for me too on a different page. I am not able to figure out why it is working on one page and not on other page. But all the other functions such as onclick, onchange are working on both pages..!! The page that onselect is not working has lot of JS code. Okay, but that should not stop it from atleast showing me alert window when I do onselect="alert('hi')"...!! Especially, why are all other JS functions like onchange, onclick are working fine and why not only onselect??