asp.net - Intermittant fire of javascript code behind button -



asp.net - Intermittant fire of javascript code behind button -

help. have these buttons on webpage, nested within asp paginated gridview updatepanel surrounding them. not set of of everthing there works button3 causing me problems.

<asp:button id="button1" runat="server" text="filter jobs" cssclass="mybuttonblue" style="width: 115px;" /> <asp:button id="button3" runat="server" text="reset filter" cssclass="mybuttonblue" style="width: 115px;" onclientclick="resetfilter();" /> <asp:button id="button2" runat="server" text="add new job" cssclass="mybuttonblue" style="width: 135px; float: right;" onclick="btnnewjob" />

if @ button3, have onclientclick (as know) on runtime converts onclick="" run javascript code.

the button set run "resetfilter()"... ..

<script> function resetfilter() { document.getelementbyid("filterid").value = ""; document.getelementbyid("filterjobref").value = ""; document.getelementbyid("filterjobtitle").value = ""; } </script>

the problem when press button fires code, not. know , test added following.

<script> function resetfilter() { alert("fire"); document.getelementbyid("filterid").value = ""; document.getelementbyid("filterjobref").value = ""; document.getelementbyid("filterjobtitle").value = ""; } </script>

i have noticed fire of time until ajax update has taken place on updatepanel , "sometimes" not fire.

any thought going on here?

thanks

javascript asp.net ajax button

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -