I cannot fathom this one..
for some cracked reason, one of my forms is totally OK and the other
is apparently nonexistent according to both HTML and Javascript. The
second form never submits nor does Javascript recognize it as
existent.
Here is the code. The form named "contactsForm" is the one that
fails, and I've been at it for hours with no way of fathoming why this
form not only does not submit but remains unrecognized AS a form!
[HTML]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> Content Management Application</title>
<script type="text/javascript" src="/js/functions.js"></script>
<link rel="stylesheet" href="/cma/include/style.css" type="text/css">
</head>
<body>
<table border="0" width="800">
<tr>
<td colspan="2"><img src="/images/banner_new_05042004.jpeg"
alt=""></td>
</tr>
<tr>
<td colspan="1" align="center"><b> Content Management
Application</b></td>
</tr>
<script type="text/javascript">
<!--
function isOKLogout() {
doLogout = window.confirm("Are you sure you want to logout?");
if (!doLogout) return false;
return true;
}
//-->
</script>
<tr>
<td colspan="1">
<table border="0" width="100%">
<tr>
<td bgcolor="#eeeedd">Manage Contacts</td>
<td bgcolor="#eeeedd">
<form name="searchForm" method="post" action="index.php"
onSubmit="return isValidSearch()">
Search: <br>
<select name="section">
<option value="">Choose Section:</option>
<option value="">---------------</option>
<option value="contacts" >contacts</option>
</select>
<!-- HIDDEN VAR TO DISTINGUISH SEARCH FORM ELEMENTS FROM EVERYTHING
ELSE -->
<input type="hidden" name="isFromSearch" value="1">
<br>
<input type="submit" name="doSearch" value="Search">
<script type="text/javascript">
<!--
function isValidSearch() {
if (document.searchForm.section.options[document.searchForm.section.selectedIndex].value
== '') {
alert("Please select a section for searching");
return false;
}
}
//-->
</script>
<noscript>
<!-- Will handle via server-side validation instead -->
</noscript>
</form>
</td><td bgcolor="#eeeedd"><a href="index.php?willLogout=1"
onClick="return isOKLogout()"><b>Logout</b></a></td> </tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" align="center">Manage Contacts</td>
</tr>
<tr>
<td bgcolor="#eeeedd"><b>ADD NEW CONTACT</b></td>
<td bgcolor="#eeeedd"><a
href="index.php?section=contacts&action=edit"><b>V IEW/EDIT/DELETE
CONTACT(S)</b></a></td>
</tr>
<tr>
<td colspan="2" align="center"><b>ADD NEW CONTACT</b></td>
</tr>
<tr>
<td colspan="2"><a href="index.php">Main Menu</a> <a
href="index.php?willViewLog=1">View Log</a></td>
</tr>
<tr>
<td colspan="2">
<script>
<!--
alert(document.contactsForm);
alert(document.searchForm);
//-->
</script>
</td>
</tr>
</table>
<form name="contactsForm" method="post" action="index.php">
<br>
<input type="submit" name="send" value="Add Contact">
</form>
</body>
</html>
[/HTML]
Please help!
Thanx
Phil