I am still pretty new to using jQuery to do anything, but I have had good luck with linking to Colorbox iFrames in the past.
Right now, I am trying to link a common ASP button to open up a Colorbox window. I have tried searching all over but I can’t seem to find the exact answer I’m needing. Here is what I have so far, which definitely doesn’t work at all.
<div id="openColorbox">
<asp:Button ID="NewRecordBTN" runat="server" Text="New Material Movement Request" onclick="NewRecordBTN_Click" />
</div>
<script type="text/javascript">
$(document).ready(function () {
$("#openColorbox").click(function(){
$.colorbox({
iframe: true,
width: "80%",
height: "80%",
transition: "fade" }));
});
Trying to make the jQuery .click() function watch the “openColorbox” div that I created and open on click. I also want to point the iFrame to another URL in the process.
I was able to send to a URL within the jQuery Colorbox and reload the parent page after the transaction was completed via the following code:
This will reload the parent page upon reload. It also sends it to NewMMR.aspx when it is finished.