I have a PHP application which I wrote last year - and the JavaScript
worked fine then. For some reason, now it doesn't - neither on IE nor
Firefox. Has something changed?
When I click on my HTML link now (which executes a JS function), the
firefox JS console tells me:
Error: document.Subjec tsForm.submit is not a function
Any help would be much appreciated. Thanks!
The script, fairly explanatory, is as follows (it's been trimmed of
irrelevant code):
<html>
<head>
<title>Title here</title>
</head>
<body bgcolor="#FFFFF F" background="/images/bg.gif">
<SCRIPT language="JavaS cript" type="text/javascript">
<!-- Hide script from old browsers
function submitForm() {
document.Subjec tsForm.status.v alue='add_entry ';
document.Subjec tsForm.submit() ;
}
// unhide script -->
</SCRIPT>
<form name="SubjectsF orm" action="mod_enr olment.php" method="POST">
<input type="hidden" name="status" value="ch_exams ">
<a href="javascrip t: submitForm();" class="noline"> Add Subject</a>
<input type="hidden" name="user" value="tparker" >
<input type="submit" name="submit" value="Update Subjects">
</form></p>
</body>
</html>
worked fine then. For some reason, now it doesn't - neither on IE nor
Firefox. Has something changed?
When I click on my HTML link now (which executes a JS function), the
firefox JS console tells me:
Error: document.Subjec tsForm.submit is not a function
Any help would be much appreciated. Thanks!
The script, fairly explanatory, is as follows (it's been trimmed of
irrelevant code):
<html>
<head>
<title>Title here</title>
</head>
<body bgcolor="#FFFFF F" background="/images/bg.gif">
<SCRIPT language="JavaS cript" type="text/javascript">
<!-- Hide script from old browsers
function submitForm() {
document.Subjec tsForm.status.v alue='add_entry ';
document.Subjec tsForm.submit() ;
}
// unhide script -->
</SCRIPT>
<form name="SubjectsF orm" action="mod_enr olment.php" method="POST">
<input type="hidden" name="status" value="ch_exams ">
<a href="javascrip t: submitForm();" class="noline"> Add Subject</a>
<input type="hidden" name="user" value="tparker" >
<input type="submit" name="submit" value="Update Subjects">
</form></p>
</body>
</html>
Comment