By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,376 Members | 1,581 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,376 IT Pros & Developers. It's quick & easy.

form post never submits - no errors of any kind

P: n/a
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>

&nbsp;&nbsp;
<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>&nbsp;&nbsp;<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
Jul 23 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
ph**************@gmail.com (Phil Powell) wrote:
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.
Works for me. I suggest that you use a validator to locate the syntax
errors (which probably don't explain the problem encountered, but there's
no reason not to fix them), fix them, test on a few browsers, and post
the URL. Yes, we need the URL, instead of copy of code that each of us
would have to put somewhere and test _without_ the external references
like your image and style sheet and form handler.
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!


You need to explain why you think it remains unrecognized as a form.
But it _is_ an oddly trivial form, with a submit button only.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #2

P: n/a
Phil Powell wrote:
Here is the code.


It looks very much like you have some syntax errors that are easy for a
machine to spot ...

http://diveintomark.org/archives/200..._wont_help_you

I also suggest you post a URI to the troublesome page so that (a) people who
want to help don't need to spend time making up an HTML document to test
your code and (b) any problems caused by your server (or other code you
didn't include) are potentially spotable.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #3

P: n/a
David Dorward <do*****@yahoo.com> wrote in message news:<cj*******************@news.demon.co.uk>...
Phil Powell wrote:
Here is the code.


It looks very much like you have some syntax errors that are easy for a
machine to spot ...

http://diveintomark.org/archives/200..._wont_help_you

I also suggest you post a URI to the troublesome page so that (a) people who
want to help don't need to spend time making up an HTML document to test
your code and (b) any problems caused by your server (or other code you
didn't include) are potentially spotable.


I'm sorry but I can't do that. I work for a US Federal Government
contractor that does not permit me to publicize the postings in a
public URL considering this will be an intranet application in the
first place. All I can do is post a variation of the originally
generated HTML (hence, that's why the form looks so simple).

Phil
Jul 23 '05 #4

P: n/a
On 29 Sep 2004 07:11:39 -0700, Phil Powell <ph**************@gmail.com>
wrote:
All I can do is post a variation of the originally
generated HTML (hence, that's why the form looks so simple).


But rather than post a slew of code, put it on a page and post it. Surely
you can do that!

Point is, it takes a lot more time for everyone to make this code you
posted into a webpage than for you to. Plus there's more room for error,
and less possibility of seeing something you would do that might cause a
problem.

So, don't post the HTML, instead, make up a mockup page. One of
Spartanicus' posts has a good link to help you set up an ideal test case.
Can't find the link myself at the moment.
Jul 23 '05 #5

P: n/a
"Neal" <ne*****@yahoo.com> a écrit dans le message de
news:op**************@news.individual.net
All I can do is post a variation of the originally
generated HTML (hence, that's why the form looks so simple).


But rather than post a slew of code, put it on a page and post it.
Surely you can do that!


Yes, and more of that, making a simplified page sometimes helps to finds out
the original problem :)

Jul 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.