0

hello friends,

i have created a WEBSITE of an goverment department names Anti Corruption Department.

there i have given one option for online users to lodge complaints online i have create a form. user fill all the fields under that form and when he clicks on submit button all the information given by the user must be email to a specific email id but unable to do so.
below i am sending a code which i tried but its not help full.

<html>
<head><font face="times new roman" size="4" color="gray"><center><strong>REGISTER YOUR COMPLAINT HERE<hr width=75% color="#000000"></hr></strong></center></font></head>
    <script type="text\javascript">

    function checkvalidation()
    {
        if (frm.txtname.value=="")
             {
                alert("Please enter your name");
                frm.txtname.focus();
                return false;
             }
        if (!isNaN(frm.txtname.value))
            {
                alert("please enter an alphabets");
                frm.txtname.focus();
                return false;
            }
        if (frm.txtaddress.value=="")
            { 
                alert("Please enter your address")
                frm.txtaddress.focus(); 
                return false;
            }

         if (frm.txtcontact.value=="")
             { 
                alert("Please enter contact");
                frm.txtcontact.focus();
                return false;
             }
         if(frm.txtcontact.value!="")
             {
                if(isNaN(frm.txtcontact.value) || frm.txtcontact.value.length < 6)
                     {
                        alert("Please enter valid contact no");
                        frm.txtcontact.focus();
                        return false;
                    }
            }
        if (frm.txtperson.value=="")
             {
                alert("Enter Public Servent Name ");
                frm.txtperson.focus();
                return false;
             }
        if (!isNaN(frm.txtperson.value))
            {
                alert("please enter an alphabets");
                frm.txtperson.focus();
                return false;
            }
         if (frm.txtdepartment.value=="")
             {
                alert("Please enter public servant department");
                frm.txtdepartment.focus();
                return false;
            } 
        if(!isNaN(frm.txtdepartment.value))
            {
                alert("Please enter proper department");
                frm.txtdepartment.focus();
                return false;
            }   
         if (frm.txttransaction.value=="")
             {
                alert("Please enter nature or transaction");
                frm.txttransaction.focus();
                return false;
             }  
        if (frm.txtmotive.value=="")
            {
                alert("Please enter motive for bribe");
                frm.txtmotive.focus();
                return false;
             }  
         if (frm.txtBribeDemand.value=="")
             {
                alert("Please enter quantum of bribe demanded");
                frm.txtBribeDemand.focus();
                return false;
            } 




    }   
</script>

<body bgcolor="#F2F2F2">
<form name="frm" onsubmit="return checkvalidation();" action="MAILTO:andy_aphale@yahoo.co.in" method="post" enctype="text/plain">

   <table border="0" cellspacing=0 cellpadding=0 align=center>

    <tr>
        <td width=40% height=22>Name.*</td>
        <td><input style=font-size:11px size=35 name=txtname></td>
    </tr>

    <tr>
        <td height=22>Address.*</td>
        <td><input style="font-size:11px" size=35 name=txtaddress></td>
    </tr>

    <tr>
        <td height=22>Email.</td>
        <td><input style="font-size:11px" size=35 name="txtemail"></td>
    </tr>

    <tr>
        <td height=22>Contact No.*</td>
        <td><input style="font-size:11px" size=35 name="txtcontact"></td>
    </tr>

    <tr>
        <td colspan=2><br><center><font color="gray">Public Servant(Person against Whom Complaint is to be lodged)</font></td>

    </tr>

    <tr>
        <td height=26>Person Name.*</td>
        <td><input style="font-size:11px" size=35 name="txtperson"></td>
    </tr>    

    <tr>
        <td height=26>Designation.</td>
        <td><input style="font-size:11px" size=35 name="txtdesignation"></td>
    </tr>

    <tr>
        <td height=26>Department.*<br>                
        <font color="gray">#(State Government<br>
                                 Department, State Government <br> 
                                 undertakings,municipal bodies of <br>
        Maharashtra,etc)</font><br></td>
        <td valign=top><input style="font-size:11px" size=35 name="txtdepartment"></td>
    </tr>        

    <tr> 
        <td height=26>Office Address.</td>
        <td><input style="font-size:11px" size=35 name="txtoffice"></td>
    </tr>

    <tr>
        <td colspan=2><center><br><font color="gray">About Complaint</font></center></td>
    </tr>

    <tr>
        <td>Nature Of transaction<br>
        with the Public Servant.*</td>
        <td><textarea style="font-size:11px" cols=45 name="txttransaction"></textarea></td>
    </tr>    

    <tr>
        <td><br>Purpose/Motive for<br>
            demand of Bribe.*</td>
        <td valign="bottom"><textarea style="font-size:11px" name=txtmotive cols=45></textarea></td>
    </tr>

    <tr>
        <td height=26><br>Quantum Of Bribe Demand.*</td>
        <td valign="bottom"><input style="font-size:11px" size=35 name=txtBribeDemand></td>
    <tr>

    <tr>
        <td align=center> <br><input type="submit" value="submit"></td>
        <td><br><input type="reset" value="reset"></td>
    </tr>

    <tr>
        <td><br>* Mandatory Fields</td>
    </tr>
    </table>
    <br>
    <table align=center cellpadding=8 cellspacing=0 width=55% border=1 bordercolor="gray">
            <tr>
            <td><STRONG>Note : The Complainant / Victim will have to come to the 
                                            ACB office in person and participate in the trap 
                                            operation to be carried out by the ACB.</STRONG> 
            </td>
            </tr>
    </table>
</form>
</html>

Edited by mike_2000_17: Fixed formatting

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by Shanti C
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.