Fixed header and footer being shown on image upload page when triggered by JavaScript.