[Solved] multiple commands in if statement in javascript [closed]


The problem here isn’t that multiple things aren’t happening. It’s that you’re changing location after your alert, which kills the rest of the execution, so you never get to “more stuff” cause you’ve moved on to a different page. Move window.location to either be the last thing in your method, or call it from a different method. There’s a good chance that the “more stuff” you have is going to be useless if you just up and shift pages (though of course, I have no idea what “more stuff” is so maybe it’s entirely valid to do it and then go elsewhere).

6

solved multiple commands in if statement in javascript [closed]