I have a multi form,
In a form, i have the <back and Next> button.
So i used the form action in these to button, I also have a validation which i did using javascript ,
<head>
<script type="text/javascript">
function validate_name(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{alert(alerttxt);return false}
else {return true}
}
}
function validate_form(thisform)
{
with (thisform)
{
if (validate_name(txt_name,"Please enter the Name!")==false)
{
txt_name.focus();return false
}
}
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="" onsubmit="return validate_form(this);">
</form>
</body>
so , added the javascript function in form.. The validation works good..but after that it doesnt bring me to the next page..
This is the code that i added in next button,
<input type="submit" name="button" id="button" value="Next >>" onClick="form.action='creport3.php';" />
But if i want to add the validation also, where do i add it.. it needs to be added in the next button onclick event, but how will be the code...
Any help pls..