something like that, I want the function "createDiv" to execute itself when a certain condition is meet.
    if (isset($_GET["add"]))
    {
       ?>
       <script>
           createDiv();
       </script>
       <?php
    }
    <script type="text/javascript" language="javascript">
    function createDiv()
    {
        alert ("popup!!!");
    }
    </script>
How can I call the function using a if else condition instead of click?
 
     
     
     
    