Hi, I am working in an ASP .net mvc project. The weird issue is I am running a javascript/jquery which randomly gives object required error. Sometimes it occurs but sometime it does not occur at all. What I am doing is making an explicit link click call to load a page as follows:
function LoadPopup()
{
$("#page2link").click();
}
I call Loadpopup()
in $(document).ready()
After the above gets executed, page2 loads and the javascript for page2 is trying to run but I dont know why suddenly page2's javascript throws error. I don't know exactly at what line it throws error. The break point comes at MicrosoftAjax.cs[Dynamicfile]
.
I am wondering why my debugger does not hit the breakpoint that I placed in page2's javascript. The stackj trace however shows a list of "java script anonymous functions" and also shows that these anonymous fucntions are called from loadpopup()
.
Some more information. I am having a master page. Loadpopup()
runs when mystartup.aspx loads, which inherits from the master page. Can anyone please help me in this regard? Please let me know if you need more detail?