My website's login uses AJAX to post the credentials. It then checks for an 'error/success' to be returned and then acts accordingly.
This has worked fine up until I wanted to add SSL.
Original code:
if (output == 'success')
window.location=window.location;
Replacement code:
if (output == 'success')
window.location=String(window.location).replace('http://', 'https://');
That redirects the user to the SSL'd page but it causes Firefox to present a content was partially encrypted
error.
How can I use Javascript to redirect to the SSL'd page without giving a warning?