c# - Button Not Working Without Refreshing Page -
i building website simple functions , i'm running issues. can't provided sample code because have no idea problem lies , technically site not crashing.
the frontend of site html , javascript, backend i'm using asp.net , c#.
there's button on page, trigger function in javascript. function make call backend aspx file (say, myfunction.aspx) , generate output file user download.
everything working fine. getting expected result , able download output file no problem.
i didn't notice issue until try re-run function.
i hit button again wasn't doing (i using httpfox know it's not calling anything)
i realize wasn't able run function again without refreshing page. after refreshing page works fine.
can explain why way? how can go debugging issue? don't know if problem fontend or backend.
thanks help.
edit
this how created button.
<button dojotype="dijit.form.button" type="button" onclick ="myjsfunction('uploadform')">generate</button>
and how function calling asp backend
var myjsfunction= function (formid) { dojo.io.iframe.send ({ url: 'myurl/myfunction.aspx?parameter=p', form: dojo.byid(formid), method: "post", handleas: "text", load: function (response, ioargs) { dojo.byid("timestamp").value = response; } error: function (response, ioargs) { alert("failure:" + response); } }); }
edit 2
i notice interesting.
i have been running in firefox using httpfox , not getting error message. tried run in chrome using f12 , i'm getting red alerts.
in chrome, under network tab, status says "canceled", still getting output.
how happen? how can find issue is?
check javascript console see don't have errors on page. otherwise post asp.net markup button , javascript function.
edit: try returning false javascript function. prevent default browser behavior executing (what's effect of adding 'return false' click event listener?)
Comments
Post a Comment