何在gridview的选定索引更改中的链接按钮上调用javasc

何在gridview的选定索引更改中的链接按钮上调用javasc

本文介绍了如何在gridview的选定索引更改中的链接按钮上调用javascript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的问题是,我在gridview中单击dwnload按钮就下载了一些东西.
对于用户友好的情况,我想添加"PLs wait"运动图像,以便在单击下载按钮之前,直到下载按钮开始,都可以通知用户,请等待下载开始.我正在通过javascript使用此函数,但是在cleint click事件上的链接按钮上调用此函数时,没有任何反应.我做错了吗?我也需要在页面加载事件上调用smethng吗?我的函数和gridview的代码如下:-



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">
                            <Columns>
                                <asp:TemplateField HeaderText="Work Order Name">
                                    <ItemTemplate>
                                        <asp:Label ID="lblWrkOrder" runat="server" Text='<%# bind("WorkOrder_Name") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Download">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lnkSelect" runat="server" CommandName="Select" OnClientClick = "javascript:plzwait();">Download</asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>

推荐答案


这篇关于如何在gridview的选定索引更改中的链接按钮上调用javascript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 11:48