Click to See Complete Forum and Search --> : Challenge with form submittion


Mr Dude
09-10-2007, 12:38 AM
Hi Everyone,

I am at a loss to explain why some of my form submission markup works fine, yet slightly modified markup does not!

The markup that works ok with my website is as follows:


<td valign="top" background="../images/nav/left_nav_top.gif" height="800" width="131"><img src="../images/nav/invisible_pixel.gif" width="131" height="1" border="0"> <img src="../images/home/left%20nave_graphic.gif" width="131" height="173"> <form name="searchform" action="store_searchresults.asp?strCategory=&strSubCategory=&strThirdCategory" method="post" onSubmit="MM_validateForm('strKeyword','','R');return document.MM_returnValue">
<IMG SRC="../images/nav/left_nav_search.gif" WIDTH=127 HEIGHT=12 ALT="" BORDER=0>&nbsp;
<INPUT TYPE="HIDDEN" NAME="strAction" value="search">
<input style="background-color: #FFFFFF;" type="text" name="strKeyword" size="11">
<input type="image" border="0" name="imageField" src="../images/nav/top_search_gob.gif" width="24" height="22"></form></td>

However the following markup on the same page does not work consistenty between different browser version. It works fine in IE but it does not work in Firefox. Firefox presents the message "Please enter a keyword" and refuses to submit the form.

<form name="searchform" action="store_searchresults.asp?strCategory=&strSubCategory=&strThirdCategory" method="post" onSubmit="MM_validateForm('strKeyword','','R');return document.MM_returnValue">
<input type="hidden" name="strAction" value="search">
<input type="hidden" name="strKeyword" value="LV4">
<input type="image" border="0" name="imageField" src="../images/marquee/LV4403B4.jpg" width="113" height="98">
</form>

It is as though Firefox cannot see the "strKeyword" attribute. However IE has not problem with it.

Any help with this will be greatly appreciated, as I am at a loss...

Thanks for your time

Regards

David

ray326
09-10-2007, 01:10 AM
Have you considered there might be a bug in MM_validateForm()?

Mr Dude
09-10-2007, 07:26 PM
I don't think that there is a bug in MM_validateForm() because this javascript method appears to work fine with the markup that I presented at the top of my original post.

The only difference in the markup at the bottom of my original post is that a hidden variable is used in place of a text variable. However I have substituted a text variable in place of the hidden variable and had similar results in that the form refused to submit.

Nonetheless I appreciate your input and will try to remove the javascript from some of my markup and see if that assists.

Mr Dude
09-10-2007, 08:03 PM
I have removed the javascript method for form validation from much of my markup. Firefox will now submit form data of the type that I included at the bottom of my original post. However DreamWeaver is now showing funny message boxes all over my page when I view my markup in "Design View"! There is something about my markup that is definitely not up to scratch, perhaps I have organized the form fields incorrectly, or something....

Once again any assistance will be greatly appreciated.