I don't see how adding javascript to one page can crash other pages on the site.
If you are using the HTML content feature of mojoportal to add javascript it is probably best to go into the settings and disable the editor so it just uses a plain text area. That way CKeditor nor TinyMCE will not be used. Sometimes the editors can mess with your javascript so it is best to disable them and use a textarea.
If you continue having problems give more details about the script and also about your version of mojoportal and .NET framework