location not working to load new CSP page
I have a web application and one of the CSP pages contains the following snippets:
function SubmitForm(pid,sid) {
//code to process form
alert ("study saved");
self.document.location="newpage.csp";
}
</script>
<!-- form contents -->
</form>
The form is correctly processed, the object is saved, and the alert appears, but the new page does not get loaded and I cannot figure out why.
Any suggestions?