Light Box or Popup window ''ColorBox'' , closed when record is succesfully inserted...

1 posts, 0 answers
  1. kd
    kd avatar
    23 posts
    Member since:
    Dec 2011

    Posted 14 Feb 2012 Link to this post

    Hi all,

    i am facing problem to closing clorbox when record is successfully inserted, my scenerio is follows

    i am currently working on web application and using asp.net, c# and jquery languages, i have designed registration form and open into iframe so i have palced all input fields which is required in registration process like username, email, password etc. it is working fine when i am clicking on user registration anchor than register.aspx page is open in lightbox or popup window but light box not closed when user is successfully inserted. so how can i close it on successfully record insertion rather than cliking on close button.

    i have also tried to close write this line $.colorbox.close(); on register.aspx page on submit click but it is not working ..

    kindly helpout me.

    i have written following code to open light box  and this is URL which i have implement in my project

    URL:::::  http://jacklmoore.com/colorbox/

    <asp:Content ID="Content2" ContentPlaceHolderID="cph_body" runat="server">    <link href="../Styles/colorbox.css" rel="stylesheet" type="text/css" />    <script src="../Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>    <script src="../Scripts/jquery.colorbox.js" type="text/javascript"></script>        <div class="content-body">                                <div style="padding-bottom: 10px;">                            <a class='UserRegistration' href="Register.aspx" title="User Registration"><span>                               New User Registred Here</span></a>                        </div>                               </div>    </div>        <script type="text/javascript">        jQuery(document).ready(function () {            jQuery(".UserRegistration").colorbox({ iframe: true, width: "580", height: "480", onClosed: function () { location.reload(true); } });            jQuery("#cboxClose").click(function () {                location.reload();            });        });        function CloseColorBox() {            $.colorbox.close();            location.reload();        }    </script></asp:Content>

Back to Top