javascript - Shadowbox - Auto close upon php form submission -


After the form is submitted, I am trying to close Shodobox. Currently my php survey is set to refresh the question. Now when I am using the shadowbox to load the survey on page load, I want to disappear after I press the submit button.

Site Link:

My PHP code is:

   

I'm not sure that it should be written to me in php code or shadowbox.js.

This might try -

check what the group is 1

PHP

  & lt ;? Php $  

ShadowboxClass = ''; If (! Isset ($ _ POST ["group1"])) {$ shadowboxClass = '.open'; }? & Gt; & Lt; Div id = "sb-container" class = "& lt ;? php echo $ shadowboxClass ;; & gt; & Gt;

jQuery

  window.onload = function (if ($ ("# sb-container"). Hcl ('open')) { // as soon as the window loads Shadowbox.open ({content: '

Then as Netzatch suggested that you have a session variable But then just make this statement.

  

  

Comments