PHP and JavaScript Buttons not working?
<p>My code (Below) works in Internet Explorer, but not in Chrome, Safari or Mozilla Firefox. Not sure why, but would it be possible for someone to point me in the right direction? This code has some buttons which change the form's action attribute and direct the data to different PHP controller file to do different things such as create user, modify user etc</p>

<p><strong>JavaScript code:</strong></p>

<pre><code>&lt;script language="javascript"&gt;

function formAction(flag) {
    switch (flag){
        case "create": 
            document.forms.useraction.action = "/apps/portal_admin/create_user1.php";
            break;
        case "modify":
            document.forms.useraction.action = "/apps/portal_admin/modify_user1.php";
            break;
        case "copy":
            document.forms.useraction.action = "/apps/portal_admin/copy_user1.php#user2";
            break;
    }
    document.forms.useraction.submit();
}
function helloworld() {
    alert("Hello World");
}
&lt;/script&gt;
</code></pre>

<p><strong>PHP code:</strong></p>

<pre><code>&lt;?php
    if ($authlib-&gt;auth_authobj($posting_userid,$_COOKIE['shost_app_id'],'002')&gt;=2) {
        echo "&lt;input type=\"button\" value=\"Create User\" class=\"formButton\" name=\"create\" id=\"create\" onClick=\"formAction('create')\"&gt;\n";
        echo "&lt;input type=\"button\" value=\"Copy User\" class=\"formButton\" name=\"copy\" onClick=\"formAction('copy')\"&gt;\n";
    }
    if ($authlib-&gt;auth_authobj($posting_userid,$_COOKIE['shost_app_id'],'002')&gt;=3) {
        echo "&lt;input type=\"button\" value=\"Edit User\" class=\"formButton\" name=\"modify\" onClick=\"formAction('modify')\"&gt;\n";
        echo "&lt;input type=\"button\" value=\"This button works\" class=\"formButton\" name=\"Working\" onClick=\"helloworld()\"&gt;\n";
    }
?&gt;
</code></pre>
