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
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.