Arrgghh!
I’ve just spent about 20 mins looking for an error in some code. After all that I ealised I’d missed a curley brace:
function cancel(mode)
{
if(mode == "new")
window.location.href = 'action.php?mode=cancel-new';
} else {
// mode == "existing"
window.location.href = 'action.php?mode=cancel-existing';
}
}
instead of
function cancel(mode)
{
if(mode == "new")
{
window.location.href = ‘action.php?mode=cancel-new’;
} else {
// mode == “existing”
window.location.href = ‘action.php?mode=cancel-existing’;
}
}
I think my mind must be distracted. But then I’ve been working since about 10 AM ish, so it’s been quiet a long day ![]()










August 19th, 2004 12:25
One of my favourite JavaScript errors is the old semicolon directly after the condition. Never fails to leave me baffled for an hour or so… :-/
November 27th, 2004 22:00
Eh. It happens; what really sucks is when you make the mistake over and over again, especially as Actionscript in a Flash document, and you have to change everything.