Conditionally Changing image of button in oracle apex - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Button

Description

Conditionally Changing image of button in oracle apex

Demo Code

ResultView the demo in separate window

<html>
   <head></head>
   <body onload="changeImage()">
       your input box with abdId
       .... //from  w ww .  j a v a  2 s  . com
      <script language="javascript">
    function changeImage()
    {
      if (document.getElementById("abcId").value) > 0){
          document.getElementById("ButtonID").src ="/path/to/A.png";
      else{
          document.getElementById("ButtonID").src ="/path/to/B.png";
      }
    }

      </script>  
   </body>
</html>

Related Tutorials