Submit form with anchor

25 views
Skip to first unread message

fatche

unread,
Oct 19, 2011, 12:20:34 PM10/19/11
to MooFloor
Hi,

I'm having some issues when I use an anchor instead of a submit
button.
It actually works great to check all the fields of the form I've
created, but the form isn't submited at the end.

If I replace my anchor by the regular submit button everything works
great, the form is submited.

Has anybody ever experienced this? Thanks for your help

Here is the code I use (I intentionally use the css and scripts from
mootools.floor.ch to be sure to have the right files untill it
works) :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link type="text/css" href="http://mootools.floor.ch/css/reset.css"
rel="stylesheet" media="screen" />
<link type="text/css" href="http://mootools.floor.ch/css/template.css"
rel="stylesheet" media="screen" />
<link rel="stylesheet" href="http://mootools.floor.ch/css/form.css"
type="text/css" media="screen" />
<link rel="stylesheet" href="http://mootools.floor.ch/js/formcheck/
theme/classic/formcheck.css" type="text/css" media="screen" />
<script type="text/javascript" src="http://mootools.floor.ch/js/
core.js"></script>
<script type="text/javascript" src="http://mootools.floor.ch/js/
more.js"></script>
<script type="text/javascript" src="http://mootools.floor.ch/js/
formcheck/lang/en.js"></script>
<script type="text/javascript" src="http://mootools.floor.ch/js/
formcheck/formcheck.js"></script>
<script type="text/javascript">
window.addEvent('domready', function(){new FormCheck('formular', {
display : {
errorsLocation : 3,
indicateErrors : 2,
flashTips : true,
fadeDuration : 1000
}
})});
</script>
</head>
<body>
<div id="content">
<form id="formular" method="post" action="commun/action_db.php"
class="formular">
<fieldset>
<legend>User login</legend>
<label><span>Username : </span>
<input type="text"
class="validate['required','length[6,16]','alphanum'] text-input"
name="user" style="width: 350px;" />
</label>
<label>
</label>
<label><span>Password : </span>
<input type="password"
class="validate['required','length[6,-1]'] text-input" name="password"
style="width: 350px;" />
</label>
<label>
</label>
</fieldset>
<div class="button">
<a class="submit validate['submit']" href="#">Log me in</a>
<input type="submit" />
</div>
<hr />
</form>
</div>
</body>
</html>
Reply all
Reply to author
Forward
0 new messages