Focus is not part of javascript

I have a button in aspx

. In onclientclick

I named the javascript function written in JScript.js

. Below is my javascript:

function ChangeBG()
{
   alert("hi");
} 

      

I named this function above on button click. I have put a breakpoint in javascript. But when you click on the button, a warning appears, but the control will not stop. What could be causing this? I am running in an internet browser. What change can I make to focus on the breakpoint. Can anyone please help?

0


a source to share


2 answers


Before alert("hi");

install stmtdebugger;

ChangeBG() 
{
  debugger; 
  alert("hi"); 
}

      



Your control will come into debug when you are in debug mode. This issue occurs when javascript is in a separate js file.

+2


a source


Also do this to enable debugging in your IE browser Go to

Tool -> Internet Options -> Advanced



Uncheck - Disable script debugging (Internet Explorer)

+1


a source







All Articles