I'd probably do it something like this:
<head>
<title> Cache Server Page </title>
<script language='javascript'>
function SubmitForm(pid,sid) {
var elem = document.getElementsByName("Studyform");
elem[0].submit;
//code to process form
alert ("study saved");
self.document.location="newpage.csp";
}
</script>
</head>
<body>
<form name="Studyform">
<input type="button" name="submit" value="submit" onclick="javascript:SubmitForm(#(SubjObj.%Id())#,#(StudyObj.%Id())#);">
</form>
</body>
</html>
or this, which is very similar apart from the use of 'id' rather than 'name'
<html>
<head>
<title> Cache Server Page </title>
<script language='javascript'>
function SubmitForm(pid,sid) {
var elem = document.getElementById("Studyform");
elem.submit;
//code to process form
alert ("study saved");
self.document.location="newpage.csp";
}
</script>
</head>
<body>
<form id="Studyform">
<input type="button" name="submit" value="submit" onclick="javascript:SubmitForm(#(SubjObj.%Id())#,#(StudyObj.%Id())#);">
</form>
</body>
</html>
- Log in to post comments