Note that there are some explanatory texts on larger screens.

plurals
  1. PODynamically find the position of a button is asp.net?
    primarykey
    data
    text
    <p>i have written one javascript function to retrieve the position of a button and assigned it to asp:updateprogress but i want to apply the button's position to div element in the code or a label control within the updateprogress not to update progress.</p> <pre><code>&lt;asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="SendMailUpdatePanel" DisplayAfter="0"&gt; &lt;ProgressTemplate&gt; &lt;div id="blur" style="top: 0px; left: 0px; width: 99%; height: 5000px; position: absolute;background-color: white; z-index: 999; filter: alpha(opacity=50); opacity: 0.5;-moz-opacity: 0.85; padding-top: 25%; padding-left: 30%;" /&gt; &lt;div id="progress" style="text-align: center; width: 444px; border: 1px solid black;padding: 10px; background-color: #eee; z-index: 998; filter: alpha(opacity=500);-moz-opacity: 1.00;"&gt; &lt;b&gt;Mail is being Sent! Please Wait...&lt;/b&gt; &lt;br /&gt; &lt;asp:Image ID="LoadImage" runat="server" ImageUrl="~/Images/spinner.gif" /&gt; &lt;br /&gt; &lt;/div&gt; &lt;/ProgressTemplate&gt; &lt;/asp:UpdateProgress&gt; </code></pre> <p>My javascript function is:</p> <pre><code>function getPosition(btnSendResume, progress) { var btnSendRe = document.getElementById(btnSendResume); var divp = document.getElementById(progress); divp.style.display="block"; divp.style.left=btnSendRe.offsetLeft; divp.style.top=btnSendRe.offsetTop + btnSendRe.offsetHeight - 40; } </code></pre> <p>I have written following under button click:</p> <pre><code>btnSendResume.Attributes.Add("onclick", "getPosition('" + btnSendResume.ClientID + "','" + UpdateProgress2.FindControl(progress).ClientID + "');"); </code></pre> <p>But it is giving error that <code>progress</code> doesn't exist under the current context.</p>
    singulars
    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.
    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