In article <ci**********@atlantis.news.tpi.pl>,
Cezar <ce*****@imail.net.pl> wrote:
<a href="javascript:;" title="Edit"
onclick="document.formularz.edited_param_id.value= '0';document.formularz.submi
t()">Edit «</a>
You are using a link to submit a form. While I have not seen the web
page, it is best to be consistent as possible. Links are for
navigation. Buttons are used to submit forums.
Here is an example of validating a forum then submitting the form.
Robert
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Check a form field</title>
<script type="text/javascript">
function validate(x)
{
var submitOK = true;
var messageText =
"What a suprise! Please correct the error in your ways." +
" Please remove the asterisk ( * ) in the name field.";
if (x.elements["theName"].value.indexOf("*") >= 0)
{
alert(messageText);
submitOK = false;
}
return submitOK;
}
</script>
</head>
<body>
<p>
This html file shows how to cancel a submit.
To cancel the submit, place an asterisk ( * ) in the name field.
</p>
<form name="myForm"
action="http://www.natAValidWebAddress.com"
method="POST"
onsubmit="return validate(document.forms['myForm']);">
<p>Name:<br>
<input type="text" name="theName" size="20"></p><br><br>
<input type="submit" value="Please submit">
</form>
</body>
</html>