title: jquery: Colorbox close iFrame onsubmit
body: <p>i´ve got a question about closing a form withing a colorbox after submit. I found this <a href="https://stackoverflow.com/questions/2009973/close-colorbox-iframe-after-submit">question </a> so i now know how to close the form after submit. The problem is that another javascript validates the input fields of my form and there will be an error message (a simple alert()) when some fields are not filled in...i wanne close the clorbox iframe onsubmit only when the validation returns no error..otherwise the user will get the hint that he missed some input fields but the form will close anyway...so how can i check this with jQuery..is there a possiblity to maybe check if an "alert()" is shown on screen...then is could say, when the alertpopup is shown don´t close the colorbox window, otherwise close it because there was no error...does anyone understand what i mean? Again: I cannot change the validation script! Then i could simply add the <code>.colorbox.close();</code> within this script...</p>
  
  <p>The validation is a simple function which is executed onsubmit...there is a variable "msg" which contains the errormessage within this function..there must be a way to get this "msg" variable when the function executes and to check whether it´s empty or not....?</p>
  
  <p>Can anyone help me with this...it´s a bit difficult to explain for me..</p>