T
teddysnips
Yesterday I posted a message about a problem hitting a breakpoint when
debugging Javascript in VS2003.
Today I've found out what the problem is. I created a new VS2003 web
solution with a single aspx page, with three controls - a text box, a
check box and a submit button. I put the following code in the page:
<script language="javascript" id="Custom">
<!--
// Get document element
function getE(id) {
return document.getElementById(id);
}
document.all.item("Form1").onsubmit=fubar;
function fubar() {
getE('txtMyText').value = "hidden";
}
Everything worked fine UNTIL I set the AutoPostBack property of the
check box to "True". When I looked in the Running Documents for the
rendered HTML, it turns out that the
function __doPostBack(eventTarget, eventArgument)
code block is NOT showing in the Running Documents, despite being in
the View Source. So, naturally, when you try to set a breakpoint in
code BELOW the __doPostBack the poor old debugger can't associate the
line with executable code.
Further digging reveals that this problem exists for VS2003 and IE7.
I'm just going to have to try to roll back to IE6. What a crock.
Edward
debugging Javascript in VS2003.
Today I've found out what the problem is. I created a new VS2003 web
solution with a single aspx page, with three controls - a text box, a
check box and a submit button. I put the following code in the page:
<script language="javascript" id="Custom">
<!--
// Get document element
function getE(id) {
return document.getElementById(id);
}
document.all.item("Form1").onsubmit=fubar;
function fubar() {
getE('txtMyText').value = "hidden";
}
Everything worked fine UNTIL I set the AutoPostBack property of the
check box to "True". When I looked in the Running Documents for the
rendered HTML, it turns out that the
function __doPostBack(eventTarget, eventArgument)
code block is NOT showing in the Running Documents, despite being in
the View Source. So, naturally, when you try to set a breakpoint in
code BELOW the __doPostBack the poor old debugger can't associate the
line with executable code.
Further digging reveals that this problem exists for VS2003 and IE7.
I'm just going to have to try to roll back to IE6. What a crock.
Edward