M
mk834tt
I am using firebug in firefox to debug my buggy javascripts. I have a
"prep" function that builds another function on the fly. It sticks an
onclick event def inside a list element. Looks like (is actually a
book example):
07 for (var ndx = 0; ndx < anchors.length; ndx++) {
08 anchors[ndx].onclick = function() {
09 showPic(this);
10 return false;
11 }
12 }
Firebug show the function as anonymous. I want a name, so I changed
line 08 to:
anchors[ndx].onclick = function aname() {
Firebug still lists an anonymous function. Is there a way to assign a
name?
Second question. If I modify the DOM, I don't expect to see it in the
html source code. Is there a display in firebug that renders the
modified source? I see complex listings in the right window (Style
Layout DOM), but can't figure out how to view the code as displayed.
Thanks.
"prep" function that builds another function on the fly. It sticks an
onclick event def inside a list element. Looks like (is actually a
book example):
07 for (var ndx = 0; ndx < anchors.length; ndx++) {
08 anchors[ndx].onclick = function() {
09 showPic(this);
10 return false;
11 }
12 }
Firebug show the function as anonymous. I want a name, so I changed
line 08 to:
anchors[ndx].onclick = function aname() {
Firebug still lists an anonymous function. Is there a way to assign a
name?
Second question. If I modify the DOM, I don't expect to see it in the
html source code. Is there a display in firebug that renders the
modified source? I see complex listings in the right window (Style
Layout DOM), but can't figure out how to view the code as displayed.
Thanks.