开发者

jquery/javascript object required error

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开发者_如何学Python. 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 don't 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 "JavaScript anonymous functions" and also shows that these anonymous functions 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?


Get Firefox and install the Firebug plugin. Load your page, activate Firebug for the page and then reload. You may receive instant enlightenment. If not, put a breakpoint a loadpopup() and step through the code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜