<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using jQuery to display a modal UpdatePanel confirmation</title>
	<atom:link href="http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/feed/" rel="self" type="application/rss+xml" />
	<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/</link>
	<description>ASP.NET and AJAX code, ideas, and examples.</description>
	<lastBuildDate>Sun, 14 Mar 2010 13:33:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/#comment-36378</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Tue, 01 Sep 2009 15:44:31 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=718#comment-36378</guid>
		<description>The problem is that &lt;em&gt;this&lt;/em&gt; doesn&#039;t refer to your element anymore in the callback.  Cache it in a variable before the $.ajax() call and then use that variable to reference the element later in the callback.</description>
		<content:encoded><![CDATA[<p>The problem is that <em>this</em> doesn&#8217;t refer to your element anymore in the callback.  Cache it in a variable before the $.ajax() call and then use that variable to reference the element later in the callback.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Werner</title>
		<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/#comment-36377</link>
		<dc:creator>Robert Werner</dc:creator>
		<pubDate>Tue, 01 Sep 2009 13:39:07 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=718#comment-36377</guid>
		<description>Sampath, I came across a situation similar to yours and resolved it this way: http://mwtech.blogspot.com/2009/08/subtle-messagebox.html

Hope this helps,

Robert</description>
		<content:encoded><![CDATA[<p>Sampath, I came across a situation similar to yours and resolved it this way: <a href="http://mwtech.blogspot.com/2009/08/subtle-messagebox.html" rel="nofollow">http://mwtech.blogspot.com/2009/08/subtle-messagebox.html</a></p>
<p>Hope this helps,</p>
<p>Robert</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sampath Dassanayake</title>
		<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/#comment-36376</link>
		<dc:creator>Sampath Dassanayake</dc:creator>
		<pubDate>Tue, 01 Sep 2009 09:22:42 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=718#comment-36376</guid>
		<description>HI Dave,

I am using a modal Dialog to allow users to send a message. The whole thing works beautifully. But I want to automatically close the dialog box once the message has been posted. 

I have this code:
success: function(msg) {
    $(this).dialog(&#039;close&#039;);
},

But the dialog box just doesnt close. But if I put any other code there, it gets executed. I tried FireBug, but it keeps going into to jQueryUI scripts and those are never ending.

Any ideas?

Thanks,
Sampath</description>
		<content:encoded><![CDATA[<p>HI Dave,</p>
<p>I am using a modal Dialog to allow users to send a message. The whole thing works beautifully. But I want to automatically close the dialog box once the message has been posted. </p>
<p>I have this code:<br />
success: function(msg) {<br />
    $(this).dialog(&#8216;close&#8217;);<br />
},</p>
<p>But the dialog box just doesnt close. But if I put any other code there, it gets executed. I tried FireBug, but it keeps going into to jQueryUI scripts and those are never ending.</p>
<p>Any ideas?</p>
<p>Thanks,<br />
Sampath</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madval</title>
		<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/#comment-35502</link>
		<dc:creator>madval</dc:creator>
		<pubDate>Sat, 06 Jun 2009 23:57:57 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=718#comment-35502</guid>
		<description>There&#039;s a problem to display image indicator when using blockUI Version 2.20, the progress-indicator was not displayed.

At first, implementing the example of the previous post I thought I wrote something wrong, so I decided to move on this second example and use the downloaded code, but the image indicator was still not displayed.

I changed blockUI plugin to version 2.09 and problem solved. I&#039;m in my first steps with js/jQuery so I can&#039;t see why this is happening.</description>
		<content:encoded><![CDATA[<p>There&#8217;s a problem to display image indicator when using blockUI Version 2.20, the progress-indicator was not displayed.</p>
<p>At first, implementing the example of the previous post I thought I wrote something wrong, so I decided to move on this second example and use the downloaded code, but the image indicator was still not displayed.</p>
<p>I changed blockUI plugin to version 2.09 and problem solved. I&#8217;m in my first steps with js/jQuery so I can&#8217;t see why this is happening.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/#comment-35174</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Sat, 02 May 2009 16:08:48 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=718#comment-35174</guid>
		<description>What you&#039;re probably running into is that BlockUI shuffles things around in the DOM.  So, your Button will no longer be caught as an async postback trigger by ASP.NET AJAX.

Is it possible that you could use a web service or page method call instead?  That would be a lot easier to manage from within the modal.</description>
		<content:encoded><![CDATA[<p>What you&#8217;re probably running into is that BlockUI shuffles things around in the DOM.  So, your Button will no longer be caught as an async postback trigger by ASP.NET AJAX.</p>
<p>Is it possible that you could use a web service or page method call instead?  That would be a lot easier to manage from within the modal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Werner</title>
		<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/#comment-35173</link>
		<dc:creator>Robert Werner</dc:creator>
		<pubDate>Sat, 02 May 2009 02:57:21 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=718#comment-35173</guid>
		<description>Dave,

I&#039;m experimenting with your example and added a second button as follows:


   added
  &#160;&#160;
  


What I would like is when this other button is pressed, its server-side event fires and then the dialog box fades away as with Close.  Here&#039;s the extra jQuery code I added:

    $(&#039;#Button1&#039;).click(function(evt) {
      evt.preventDefault();

      $(&#039;#EntryForm&#039;).unblock({
        onUnblock: function() {
          $(&#039;#ConfirmSave&#039;).remove();
        }
      });
    }); 

But when I tried this, pressing &quot;Test&quot; caused an entire postback.  Yet if I remove UseSubmitBehavior=&quot;false&quot; then the server-side event does not fire.

What should I do?

Robert</description>
		<content:encoded><![CDATA[<p>Dave,</p>
<p>I&#8217;m experimenting with your example and added a second button as follows:</p>
<p>   added<br />
  &nbsp;&nbsp;</p>
<p>What I would like is when this other button is pressed, its server-side event fires and then the dialog box fades away as with Close.  Here&#8217;s the extra jQuery code I added:</p>
<p>    $(&#8216;#Button1&#8242;).click(function(evt) {<br />
      evt.preventDefault();</p>
<p>      $(&#8216;#EntryForm&#8217;).unblock({<br />
        onUnblock: function() {<br />
          $(&#8216;#ConfirmSave&#8217;).remove();<br />
        }<br />
      });<br />
    }); </p>
<p>But when I tried this, pressing &#8220;Test&#8221; caused an entire postback.  Yet if I remove UseSubmitBehavior=&#8221;false&#8221; then the server-side event does not fire.</p>
<p>What should I do?</p>
<p>Robert</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/#comment-35108</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Mon, 27 Apr 2009 14:18:55 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=718#comment-35108</guid>
		<description>You could use a page method instead of web service, if you prefer the code located in the page&#039;s code behind.</description>
		<content:encoded><![CDATA[<p>You could use a page method instead of web service, if you prefer the code located in the page&#8217;s code behind.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/#comment-35106</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Mon, 27 Apr 2009 11:38:32 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=718#comment-35106</guid>
		<description>Dave,
is there any way to fire action on reply from server by using code behind file, not web service + jQuery?
Or here is only one way - jQuery+web service?</description>
		<content:encoded><![CDATA[<p>Dave,<br />
is there any way to fire action on reply from server by using code behind file, not web service + jQuery?<br />
Or here is only one way &#8211; jQuery+web service?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Finke</title>
		<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/#comment-34013</link>
		<dc:creator>Kevin Finke</dc:creator>
		<pubDate>Thu, 05 Feb 2009 21:08:52 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=718#comment-34013</guid>
		<description>Great work!  I&#039;ve been reading all your articles and learning a bunch... and realizing I have a bunch to learn of some new topics!

I have a similar problem I believe, and it seems you&#039;ve done enough work in this area to point me in the right direction.  

Basically, I want to display a lightbox after an asp.net-ajax call inside my updatepanel.  In my first application, it will be from a navigation button on an asp:wizard control.  As that control posts back, some business logic runs to validate some of the users&#039; selections.  If things are fine, we just advance to the next step.  If not, I want to use some lightbox to display a message.

I&#039;ve detailed my efforts so far here:
http://stackoverflow.com/questions/504464/how-to-show-a-lightbox-dialog-from-an-asp-net-ajax-response

Thanks!</description>
		<content:encoded><![CDATA[<p>Great work!  I&#8217;ve been reading all your articles and learning a bunch&#8230; and realizing I have a bunch to learn of some new topics!</p>
<p>I have a similar problem I believe, and it seems you&#8217;ve done enough work in this area to point me in the right direction.  </p>
<p>Basically, I want to display a lightbox after an asp.net-ajax call inside my updatepanel.  In my first application, it will be from a navigation button on an asp:wizard control.  As that control posts back, some business logic runs to validate some of the users&#8217; selections.  If things are fine, we just advance to the next step.  If not, I want to use some lightbox to display a message.</p>
<p>I&#8217;ve detailed my efforts so far here:<br />
<a href="http://stackoverflow.com/questions/504464/how-to-show-a-lightbox-dialog-from-an-asp-net-ajax-response" rel="nofollow">http://stackoverflow.com/questions/504464/how-to-show-a-lightbox-dialog-from-an-asp-net-ajax-response</a></p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matteo Conta</title>
		<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/#comment-34010</link>
		<dc:creator>Matteo Conta</dc:creator>
		<pubDate>Thu, 05 Feb 2009 09:15:36 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=718#comment-34010</guid>
		<description>Same problem with the linkButton and BlockUI, the postback isn&#039;t working.

The call to the __doPostback function doesn&#039;t work.

Solved inserting a timeout in the OnClientClick event:

setTimeout(&#039;BlockPage()&#039;,10);return true;

LinkButton Code:

&#039; &gt;</description>
		<content:encoded><![CDATA[<p>Same problem with the linkButton and BlockUI, the postback isn&#8217;t working.</p>
<p>The call to the __doPostback function doesn&#8217;t work.</p>
<p>Solved inserting a timeout in the OnClientClick event:</p>
<p>setTimeout(&#8216;BlockPage()&#8217;,10);return true;</p>
<p>LinkButton Code:</p>
<p>&#8216; &gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey</title>
		<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/#comment-33613</link>
		<dc:creator>Sergey</dc:creator>
		<pubDate>Sun, 14 Dec 2008 16:51:31 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=718#comment-33613</guid>
		<description>Thanks again Dave, I&#039;ll go ahead and use thickbox for that task.</description>
		<content:encoded><![CDATA[<p>Thanks again Dave, I&#8217;ll go ahead and use thickbox for that task.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/#comment-33607</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Sun, 14 Dec 2008 08:25:14 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=718#comment-33607</guid>
		<description>That&#039;s probably due to how BlockUI moves things around in the DOM.  You&#039;ll probably find that it&#039;s a severely uphill battle to make it work.

Matt Berseth has a good post on how to use a different jQuery plugin to do what you&#039;re after:  http://mattberseth.com/blog/2008/06/masterdetail_with_the_gridview_1.html.</description>
		<content:encoded><![CDATA[<p>That&#8217;s probably due to how BlockUI moves things around in the DOM.  You&#8217;ll probably find that it&#8217;s a severely uphill battle to make it work.</p>
<p>Matt Berseth has a good post on how to use a different jQuery plugin to do what you&#8217;re after:  <a href="http://mattberseth.com/blog/2008/06/masterdetail_with_the_gridview_1.html" rel="nofollow">http://mattberseth.com/blog/2008/06/masterdetail_with_the_gridview_1.html</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey</title>
		<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/#comment-33599</link>
		<dc:creator>Sergey</dc:creator>
		<pubDate>Sat, 13 Dec 2008 01:46:48 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=718#comment-33599</guid>
		<description>Dave, thanks a lot for wonderful posts. 

I went a little crazier with blockui and put an updatepanel with detailsview in it. So it works like a master/details modal display. It works a great with  displaying the data, however if you try to implement edit and update functionality, async postbacks do fire up but they don&#039;t include any parameters from textboxes in the post. Therefore nothing gets updated. I&#039;ve been looking around for the whole day I can&#039;t find any info on that, do you have any ideas? 

Thanks,</description>
		<content:encoded><![CDATA[<p>Dave, thanks a lot for wonderful posts. </p>
<p>I went a little crazier with blockui and put an updatepanel with detailsview in it. So it works like a master/details modal display. It works a great with  displaying the data, however if you try to implement edit and update functionality, async postbacks do fire up but they don&#8217;t include any parameters from textboxes in the post. Therefore nothing gets updated. I&#8217;ve been looking around for the whole day I can&#8217;t find any info on that, do you have any ideas? </p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/#comment-33236</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Thu, 13 Nov 2008 18:37:26 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=718#comment-33236</guid>
		<description>Dave,

I solved the issue by ensuring that my link button&#039;s OnClientClick event had a 

&lt;pre lang=&quot;csharp&quot;&gt;__doPostback(&#039;&quot; + LinkButton.ClientID + &quot;&#039;, &#039;&#039;); &lt;/pre&gt;

attached to it. I add this bit of code to the code that calls the .blockUI() method. After the .blockUI() method is fired off, it&#039;s necessary to ensure that the post back occurs. 

This manual call to __doPostBack seems to do the trick.

I got that clue from your post about what happens with the UseSubmitBehavior on regular buttons.

Thanks for all the info and examples. Really great stuff!

- Aaron</description>
		<content:encoded><![CDATA[<p>Dave,</p>
<p>I solved the issue by ensuring that my link button&#8217;s OnClientClick event had a</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">__doPostback<span style="color: #000000;">&#40;</span><span style="color: #666666;">'&quot; + LinkButton.ClientID + &quot;'</span>, <span style="color: #666666;">''</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

<p>attached to it. I add this bit of code to the code that calls the .blockUI() method. After the .blockUI() method is fired off, it&#8217;s necessary to ensure that the post back occurs. </p>
<p>This manual call to __doPostBack seems to do the trick.</p>
<p>I got that clue from your post about what happens with the UseSubmitBehavior on regular buttons.</p>
<p>Thanks for all the info and examples. Really great stuff!</p>
<p>- Aaron</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://encosia.com/2008/10/11/using-jquery-to-display-a-modal-updatepanel-confirmation/#comment-33235</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Thu, 13 Nov 2008 18:19:30 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=718#comment-33235</guid>
		<description>Dave,

I have a LinkButton on my page. I wire up the OnCommand event for that link button to fire off some code in my codebehind. In the Page_Load method, I add an OnClientClick javascript call to that LinkButton that calls the .blockUI() method.

The issue seems is that as soon as .blockUI() is called, I&#039;m experiencing the same issue that Shalan experienced. Since LinkButton&#039;s don&#039;t have the UseSubmitBehavior property, I found that even if I use the OnClick method for the LinkButton and not the OnCommand (which I believe submits the entire form?) I still get the post from the button blocked. Essentially as soon as I click the button, my post back dissapears. I can not debug to the codebehind in my Click event.

Is there something I&#039;m missing here? Is there a default property that stops the .blockUI from catching all requests or posts, that I have to set?

Thanks in advance,

- Aaron</description>
		<content:encoded><![CDATA[<p>Dave,</p>
<p>I have a LinkButton on my page. I wire up the OnCommand event for that link button to fire off some code in my codebehind. In the Page_Load method, I add an OnClientClick javascript call to that LinkButton that calls the .blockUI() method.</p>
<p>The issue seems is that as soon as .blockUI() is called, I&#8217;m experiencing the same issue that Shalan experienced. Since LinkButton&#8217;s don&#8217;t have the UseSubmitBehavior property, I found that even if I use the OnClick method for the LinkButton and not the OnCommand (which I believe submits the entire form?) I still get the post from the button blocked. Essentially as soon as I click the button, my post back dissapears. I can not debug to the codebehind in my Click event.</p>
<p>Is there something I&#8217;m missing here? Is there a default property that stops the .blockUI from catching all requests or posts, that I have to set?</p>
<p>Thanks in advance,</p>
<p>- Aaron</p>
]]></content:encoded>
	</item>
</channel>
</rss>
