My developer tool says there's a parse error in this line, but I don't see it. Do you?
PHP Code:
echo 'var div = document.getElementById('subcat');'
Here's the function in which that line belongs
PHP Code:
<?php 
session_start
();
    
$url $_SESSION['url'];
    
//$url = "http://localhost";
session_write_close();

header('Content-type: text/javascript');
echo 
'var url = "' $url '";';
//echo 'alert(url);';
echo 'function subcat5() {;';
        
//echo 'alert(url + "/index.php");';
    
echo 'var div = document.getElementById('subcat');'//get the container on the page
    //echo 'div.innerHTML = '';'; //clear out the subcat
    //echo 'var new_subcat = document.createElement('form');';//create form
    //echo 'new_subcat.action = url + "/index.php";';
    //echo 'new_subcat.id = "models";';
    //echo 'div.appendChild(new_subcat);';
echo '};';
?>