|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have 3 mandatory fields
Name Contact Number Email Address So , firstly wen u submit the form it should give me a msg saying all the fields are missing. please fill in. Next , when i enter the value for name and i submit , it still gives me the same msg saying that all the 3 fields are missing . The main thing is that wen i enter any one , it should say the other 2 so and so are missing . can someone help me with this part of code Thnxxx in advance Swetha |
|
#2
|
||||
|
||||
|
post the code that you're currently using, so that we can see where you're at and where the issue may be.
__________________
Come JOIN the party!!! Quote of the Month: Sacrifice (Temple): All we ask here is that you give us your heart. Questions to Ponder: If the #2 pencil is the most popular, why is it still #2? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright© 2008 sbenj69 |
|
#3
|
|||
|
|||
|
Code.....
Code:
<!--#Include File="includes/CnnOpen.asp"-->
<html>
<head>
</head>
<script language="javascript">
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
function chkform()
{
if (document.frm1.Name1.value=="" || document.frm1.ContactNumber.value=="" || document.frm1.ReturnEmailAddress.value=="")
{
alert("The following fields need to be filled in Name, Contact Number, \n Return Email Address , Type Of Permit");
document.frm1.Name1.focus();
return false;
}
if (document.frm1.ReturnEmailAddress.value!="")
{
if (document.frm1.ReturnEmailAddress.value.indexOf("@")==-1)
{
alert("Enter a valid Email Address");
document.frm1.ReturnEmailAddress.focus();
document.frm1.ReturnEmailAddress.select();
return false;
}
if (document.frm1.ReturnEmailAddress.value.indexOf(".")==-1)
{
alert("Enter a valid Email Address");
document.frm1.ReturnEmailAddress.focus();
document.frm1.ReturnEmailAddress.select();
return false;
}
if(document.frm1.ReturnEmailAddress.value.length < 9)
{
alert("Enter a valid Email Address");
document.frm1.ReturnEmailAddress.focus();
document.frm1.ReturnEmailAddress.select();
return false;
}
}
return true;
if(document.frm1.ContactNumber.value=="")
{
alert("enter your Contact Number");
document.frm1.ContactNumber.focus();
return false;
}
if(document.frm1.ReturnEmailAddress.value=="")
{
alert("enter your Return Email Address");
document.frm1.ReturnEmailAddress.focus();
return false;
}*/
}
</script>
<BODY>
<form action="xyz.asp" name="frm1" method="post" OnSubmit="return chkform();">
<TABLE id=TABLE1>
andsooo onnnnnnnnnnnnnnnnnnn Last edited by mehere : June 27th, 2008 at 02:14 PM. Reason: added code tags ... please use them in the future when posting code |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Upload - Very important - Help with code - please |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|