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
sp13sp13 

onblur event not working in IE

the onblur works fine in chrome but doesn't work in Iinternet Explorer
 
<apex:inputField onfocus="displayPlaceholder();" value="{!newIdea.Title}" id="myTitle" onblur="checkNextFocus();">

      <div id="bodyPlaceholder" onclick="newBodyPlaceholder();"> 
          What problem does this solve?
          <br/><br/><br/>
          What is the business case?
      </div> 


//script
        console.log('START: newBodyPlaceholder()');
        function newBodyPlaceholder() {
            document.getElementById("bodyPlaceholder").style.display = "none";
        }
        
        console.log('START: displayPlaceholder()');
        function displayPlaceholder() {
            document.getElementById("bodyPlaceholder").style.display = "block";
        }
        
        console.log('START: checkNextFocus()');
        function checkNextFocus() {
            if(document.activeElement.nodeName.toUpperCase() == 'BODY') {
                newBodyPlaceholder();
            }
        }

 
William TranWilliam Tran
Not every event is supported on every version of every browser.  What IE version did you test with?  IE8 and lower are not longer supported.  Trying get the latest version is to if it will work for you.

As a common practice, if your question is answered, please choose 1 best answer. 
But you can give every answer a thumb up if that answer is helpful to you. 

Thanks
sp13sp13
I am using IE11.