Note that there are some explanatory texts on larger screens.

plurals
  1. POModal popup, update panel and client side update
    primarykey
    data
    text
    <p>I am trying to display a modal pop up after updating pop up controls' values, all in client side.</p> <p>A link button in a grid row is clicked. Using some of the data from that row, I call a javascript function to populate modal pop up's controls and show it. Modal pop up pops up fine but contorls are all blank. (removing UpdateMode="Consitional" has no effect). I have removed all formatting lines to keep the code short.</p> <pre><code>&lt;asp:UpdatePanel runat="server" ID="upnlNewIDS" RenderMode="Inline" UpdateMode="Conditional"&gt; &lt;ContentTemplate&gt; &lt;asp:Panel runat="server" ID="divReassign" Width="350" Style="border:solid 2px navy;display:none;background: url(../assets/images/bg3.gif);"&gt; &lt;asp:Label runat="server" ID="lblFacilityCount" /&gt; &lt;asp:Label runat="server" ID="lblCurrIDSName_BK" /&gt; &lt;asp:Label runat="server" ID="lblCurrSiteName" /&gt; &lt;asp:Button runat="server" ID="btnSOK" Text="OK" Width="75" /&gt; &lt;asp:Button runat="server" ID="btnCancel" Text="Cancel" Width="75" /&gt; &lt;/asp:Panel&gt; &lt;ajaxToolkit:ModalPopupExtender runat="server" ID="mpeNewIDS" TargetControlID="btnFake" BackgroundCssClass="backgrondModal" DropShadow="true" BehaviorID="mpeNewIDS" PopupControlID="divReassign" CancelControlID="btnCancel" /&gt; &lt;asp:Button runat="server" ID="btnFake" Style="display:none" /&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; </code></pre> <p>This is the row's template where the link is displayed:</p> <pre><code>&lt;a id='a_&lt;%# Eval("IDSID") %&gt;' href="javascript:void(0);" onclick="PopulateView('&lt;%# Eval("idsid") %&gt;', '&lt;%# Eval("cnt" %&gt;', '&lt;%# Eval("idsname") %&gt;', '&lt;%# Eval("sitename") %&gt;')"&gt;Reassign&lt;/a&gt; </code></pre> <p>Javascript: I traced the code and this function has all the correct parameter values.</p> <pre><code>function PopulateView(idsid, cnt, idsname, sitename) { lblCurrIDSName_BK = document.getElementById('&lt;%=lblCurrIDSName_BK.ClientID %&gt;'); lblFacilityCount = document.getElementById('&lt;%=lblFacilityCount.ClientID %&gt;'); lblCurrSiteName = document.getElementById('&lt;%=lblCurrSiteName.ClientID %&gt;'); lblCurrIDSName_BK.value = idsname; lblCurrSiteName.value = sitename; lblFacilityCount.value = cnt; ShowNewIDSModalPopup(); } function ShowNewIDSModalPopup() { $find("mpeNewIDS").show(); return false; } function HideNewIDSModalPopup() { $find("mpeNewIDS").hide(); return false; } </code></pre> <p>When the link in grid's row is clicked, I call "PopulateView('a', 'b', 'c', 'd')", where a, b, c and d are from select columns of the row.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload