Published on InterSystems Developer Community (https://community.intersystems.com)

Home > location not working to load new CSP page

Question
Virginia Rogers · Jul 24, 2018

location not working to load new CSP page

I have a web application and one of the CSP pages contains the following snippets:

<script language='javascript'>
function SubmitForm(pid,sid) {
//code to process form

alert ("study saved");

self.document.location="newpage.csp";

}

</script>

<form name="Studyform"  method="post" onsubmit='return SubmitForm(#(SubjObj.%Id())#,#(StudyObj.%Id())#);' >
<!-- 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?

#Beginner #JavaScript #CSP #Caché

Source URL:https://community.intersystems.com/post/location-not-working-load-new-csp-page