单击带有getElementById的表单提交后,将显示弹出窗口

I have successfully created a popup to display after clicking on a link by using a JavaScript onclick event like this:

<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">Sign In</a>

However, I am now trying to get figure out how to get this to work withut a link needing to be present. I want it to work when a php form is submitted. So basically when someone registers I want a popup to appear after the account has been successfully registered.

I want to get the element 'light' when the form is submitted. How could I do this?

EDIT:

How I am attempting to do this now..

<form action="" method="POST">
                        <div class="field">
                            <label for="fullname">Full Name</label>
                            <input type="text"  class="inputbar" name="fullname" value="<?php echo escape(Input::get('fullname')); ?>" required>
                        </div>
                        <div class="field">
                            <label for="email">Email</label>
                            <input type="email" class="inputbaremail" name="email" value="<?php echo escape(Input::get('email')); ?>" required>
                        </div>
                        <div class="field">
                            <label for="username">Username</label>
                            <input type="text" class="inputbar" name="username" value="<?php echo escape(Input::get('username')); ?>" autocomplete="off" required>
                        </div>
                        <div class="field">
                            <label for="password">Choose a password</label>
                            <input type="password" name="password" class="inputbarp" required>
                        </div>
                        <div class="field">
                            <label for="password_again">Confirm password</label>
                            <input type="password" name="password_again" class="inputbarp" required>
                        </div>


                        <input type="hidden" name="token" value="<?php echo Token::generate(); ?>">
                        <label for="signinButton">
                        <input id="signinButton" type="submit" value="Register">
                        </label><br>
                    <onsubmit = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">

                    <div id="light" class="signInpopup"><a class="close" href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Close</a>
                        <?php $success;?>
                    </div>  

As I wrote in comment, send form to URL with hash, like #sent. If hash exists, show #light and #fade.

<style>
    div {display: none}
</style>

<form action="#sent" method=post>
    ...
    <input type=submit>
</form>

<div id="light">light</div>
<div id="fade">fade</div>

<script>
    if (location.hash && location.hash == '#sent') {
        document.getElementById('light').style.display = 'block';
        document.getElementById('fade').style.display = 'block'
    }
</script>

http://jsfiddle.net/2ewsausg/

rr