Click here to Skip to main content
15,034,986 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:

My prob is this that i m downloading smething on a click of dwnload button taken in gridview.
for the user freindly scenario I want to add "PLs wait" motion image so that on click of download button till the download button starts user can be notified that please wait the download is starting. I am using this through javascript however on calling this function on link button on cleint click event nothing is happening . Am i doing smethng wrong ? Do i need to call smethng on page load event too ? my code for the function and gridview is given below :-

function plzwait()

ProgressImage = document.getElementById('progress_image');
                  setTimeout("ProgressImage.src = ProgressImage.src",100);
                  document.getElementById("divsearch").style.display = 'block';
                  document.getElementById('ctl00_BodyContents_lblsearch').innerHTML = "Data Mining is in Progress, It will Take Time So Please Wait........";


<asp:GridView ID="gv_WorkOrder" runat="server"  AutoGenerateColumns="False" OnSelectedIndexChanged="gv_WorkOrder_SelectedIndexChanged">
                                <asp:TemplateField HeaderText="Work Order Name">
                                        <asp:Label ID="lblWrkOrder" runat="server" Text='<%# bind("WorkOrder_Name") %>'></asp:Label>
                                <asp:TemplateField HeaderText="Download">
                                        <asp:LinkButton ID="lnkSelect" runat="server" CommandName="Select" OnClientClick = "javascript:plzwait();">Download</asp:LinkButton>
tanweer 20-Apr-12 7:31am
hi, Replace your Link Button html with this one:
<asp:LinkButton ID="lnkSelect" runat="server" CommandName="Select" OnClientClick = "return plzwait();">Download

1 solution

Try this... document.getElementById('<%=progress_image.ClientID%>')

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900