Here's part of my code:
1 if (document.forms[0]["displayAddress"].value == "true") {
2 if (document.forms[0]["addressPresent"].value == "") {
3 $("#addressDiv").show();
4 document.forms[0]["addressPresent"].value = "true";
5 }
6 }
Why would firebug skip over line 3? - in dubug mode it doesnt even highlight that row, just skips to the next.
edit: to clarify, line 2 evaluates to true and the debugger goes straight to line 4 without executing line 3. I have tried a forced refresh.
update: the first time the page loads this JS works, after the page is reloaded again I get this problem
Are you sure that the condition
(document.forms[0]["addressPresent"].value == "")
evaluates to true?
If it does and it just jumps to line 4, have you evaluated that it is actually executing line 3? It could be that the debugger in Firebug is skipping it. Have you tried to break on that line?
Try breaking on that line.
I've had Firebug act a little wonky with me at times. Usually a complete closing of Firefox and Firebug will fix the problem. If you need a second opinion, try Chrome's debugger.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With