-1

I am very rookie when it comes to javascript, and I unwittingly created a alert which loops endlessly and means I cannot save the document and close the program.

Is there a way in surpassing the Javascript alert UI from the operating systems perspective, so I can still control the program.

I am running OSX 10.11.6 using Coda 2.

I cannot edit the code because the Javascript alert changes the focus to it then it appears, so then I close it another window appears.

IceCode
  • 97
  • 1
  • 1
  • 5
  • 1
    please show your code – Ray Nicholus Sep 13 '16 at 15:10
  • Why can't you change the JS code to remove the infinite alerting loop? – TheDude Sep 13 '16 at 15:11
  • 1
    well presumably `window.alert = null` or something will nuke that function. Assuming you have access to some sort of dev tools. If not...I don't think there is a universal way of stopping them. Which is probably why browsers will offer to stop it for you if you get more than one alert on a page. – VLAZ Sep 13 '16 at 15:13
  • regarding your edit: I don't think there is a way around that, I'm afraid. Or at least I don't know how you'd bypass it. You might need to force terminate the application from the OS. – VLAZ Sep 13 '16 at 15:18
  • The code cannot be edited because the window which appears cannot be closed because as soon as I close on down another one appears, and there is no way in cancelling the code without access to the program. – IceCode Sep 13 '16 at 15:19
  • Force close the application and edit your code. – skyline3000 Sep 13 '16 at 15:57

1 Answers1

-1

I fixed the problem by hiding the program, then opening another document then going back to the document with the error I could save it. Then when I restarted I opened the program was able edit the code before It executed the code.

IceCode
  • 97
  • 1
  • 1
  • 5