Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modal window disappear after asp.net postback
30th July, 12:37
Post: #1
Modal window disappear after asp.net postback
Hello,
I'm using qtip to dynamically load another asp.net page as modal. this page has some buttons that cause a postback. the problem is after postback the modal qtip disappears and the asp.net page is shows in a separate browser window. parent widnow code follows.
I've been trying to fix this problem for a long time so any help will be highly appreciated.

Thanks,
Mohammad

JS Code
<script type="text/javascript">
        $(document).ready(function() {
            $('a[rel="modal"]:first').qtip(
   {
       content: {
           title: {
               text: 'my Page',
               button: 'Close'
           },
           url: 'mypage.aspx'
       },
       position: {
           target: $(document.body), 
           corner: 'center' 
       },
       show: {
           when: 'click', 
           solo: true 
       },
       hide: false,
       style: {
           width: { max: 500 },
           padding: '14px',
           border: {
               width: 9,
               radius: 9,
               color: '#666666'
           },
           name: 'light'
       },
       api: {
           beforeShow: function() {
               $('#qtip-blanket').fadeIn(this.options.show.effect.length);
           },
           beforeHide: function() {
               $('#qtip-blanket').fadeOut(this.options.hide.effect.length);
           }
       }
   });
 
            // Create the modal backdrop on document load so all modal tooltips can use it
            $('<div id="qtip-blanket">')
      .css({
          position: 'absolute',
          top: $(document).scrollTop(), // Use document scrollTop so it's on-screen even if the window is scrolled
          left: 0,
          height: $(document).height(), // Span the full document height...
          width: '100%', // ...and full width
 
          opacity: 0.5, // Make it slightly transparent
          backgroundColor: 'black',
          zIndex: 5000  // Make sure the zIndex is below 6000 to keep it below tooltips!
      })
      .appendTo(document.body) // Append to the document body
      .hide(); // Hide it initially
        });
    </script>


HTML Code
<form id="form1" runat="server">
    <div>
        <div id="content" class="modal">
            <div class="center" style="text-align: center">
                <a href="#" rel="modal">Click here to open modal</a>
            </div>
        </div>
    </div>
    </form>
Find all posts by this user
Quote this message in a reply
2nd August, 09:05
Post: #2
RE: Modal window disappear after asp.net postback
Mohammed, are you wanting the pages returned by these buttons to be placed in the qTip content? If so, it's probably a better idea to use an Iframe element, or you could possibly attach an event handler to these buttons which fetches the pages via AJAX and adjust the qTip content accordingly.

Craig Thompson
Web Developer / Designer
Craigsworks
http://www.craigsworks.com
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Position of qTip Modal from call within a tooltip chuuke 1 111 17th January 21:54
Last Post: Craig
  qTip & ASP.NET UpdatePanel Postback Problem qTipNoob 4 2,449 10th January 15:01
Last Post: naupadnara
  qTip modal accept/decline form jinx8402 0 209 15th December 13:34
Last Post: jinx8402
  [solved] Trouble with qtips adding a scrollbar momentarily to window patricia 0 147 2nd December 19:40
Last Post: patricia
Question [Solved] Prevent qTip to be displayed outside the window SDirk 2 656 9th August 15:48
Last Post: usman
  Modal tooltips on modal tooltips Dukegatts 2 404 17th June 07:38
Last Post: Dukegatts
  [Solved] Getting QTip To Disappear After Three Seconds? theferrett 4 844 4th April 16:34
Last Post: theferrett
  [Solved] Help with Multipe Modal IDs stanbridge 5 627 31st March 04:50
Last Post: stanbridge
  [Solved] qTip 1.0rc3 modal worked once only FBL 1 529 17th February 18:31
Last Post: Craig
  [Solved] Swap between showing qTip as a tooltip and as a modal window Surya 3 1,010 16th February 20:53
Last Post: Craig



User(s) browsing this thread: 1 Guest(s)