How to enable / disable button in Oracle APEX based on other button

I am searching for this every where no one is able to help me.

Only this is the one hope left for me

Below is my scenario and components I have used

*  1 file browse button - To select file 
*  2 buttons 
     first  button 1 is for validating 
     second button 2 is for submitting 

Below is my GUI designed in Oracle APEX

GUI

Note :

On page load my submit button is disabled initially – it cannot be clicked.
On that submit button I have written PL/SQL code in backend as dynamic action

So my aim is to achieve step 3

Step 1 : I will choose file using file browse button

Step 2 : After selecting my file I will click VALIDATE button.

Once I click on validate button my dynamic action will get trigger which is written in JavaScript.

This Java script checks the file choosen is empty or not and return true or false

Sample code :

  if ( file is empty ) 
  {
    return false     
  }
  else
  {
    return true
  }
 

Step 3 : Once my Validate return true my Submit button should get enabled
and After its enabled and once I click on submit button my PL/SQL code should run

I ask every one over YouTube no one as respond me