title: jQuery colorbox breaks postbacks in ASP.NET Web Forms
body: <p>We have a web forms project and in it I want to use jQuery's colorbox plugin to pop up a small window with a submit button. Because we are using web forms, the form tag cannot be part of the colorbox. The problem is that when colorbox loads the element in the DOM into the colorbox, it actually moves it to the top of the body into an absolutely positioned element. </p>
  
  <p>Normally this is fine, but it actually takes the contents out of the form tag. This makes it so that submit buttons within the colorbox no longer cause post backs.</p>
  
  <p>Here is a fiddle representing the problem:
  <a href="http://jsfiddle.net/Chevex/vbLFD/" rel="nofollow">http://jsfiddle.net/Chevex/vbLFD/</a></p>
  
  <p>If you click the submit changes button you will notice that the form posts to google and the window loads with google. However, if you click the link to load the DIV into colorbox and then click the submit button from within colorbox, nothing happens. The button was taken out of the form tag.</p>
  
  <p>Is there an easy fix for this behavior?</p>
  
  <h2>Edit</h2>
  
  <p>I thought of submitting the form with jQuery as in this fiddle: <a href="http://jsfiddle.net/Chevex/vbLFD/6/" rel="nofollow">http://jsfiddle.net/Chevex/vbLFD/6/</a></p>
  
  <p>The problem with that is if the DIV contained other input elements, like text boxes, then they too would be removed from the form tag. So even if the form gets submitted with jQuery, the input values that were supposed to be posted with the form will not be included.</p>
  
  <p>It would seem the only way to fix this would be to have colorbox stay within the form somehow.</p>