Skip to main content

SCRIPT VALIDATION

<script>
function checknull()
{

if(document.query.name.value=="")
{
 alert('Please Enter Name');
  document.query.name.focus();
 return false;
}

var x=document.forms["query"]["email"].value;
var atpos=x.indexOf("@");
var dotpos=x.lastIndexOf(".");
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
  {
  alert("Not a valid e-mail address");
  return false;
  }

/*
if (document.query.mobile.value=="")
{
 alert('Please Enter Mobile No.');
 document.query.mobile.focus();
 return false;
}

*/
//if ((document.query.mobile.value=="") || (isNaN(document.query.mobile.value)) || (document.query.mobile.value.length!=10))

if (document.query.mobile.value=="" || isNaN(document.query.mobile.value) || document.query.mobile.value.length!=10)
{
 alert('Please Enter Mobile No.');
 document.query.mobile.focus();
 return false;
}




if (document.query.city.value=="")
{
   alert('Please Enter City Name');
      document.query.city.focus();
 return false;
}

if(document.query.course.value=="")
{
 alert('Please Enter Course Name');
 document.query.course.focus();
 return false;
}

if(document.query.message.value=="")
{
 alert('Please Enter Your Query');
 document.query.message.focus();
 return false;
}

alert("Thank you for showing intrest in us. Shortly You will get call from us.");
}
</script>
</head>

<body>
<table width="225" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center"><table width="225" height="400" border="0" cellpadding="0" cellspacing="0" background="images/roundcornertopbg2.jpg">
      <tr>
        <td width="270" align="center" valign="top" class="style35"><table width="220" height="90" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#DFDBDA">
            <tr>
              <td><img src="images/caller.jpg" width="220" height="90" border="0" /></td>
            </tr>
          </table>
            <form action="addenquiry.php" method="post" name="query" id="query" onsubmit="return checknull();">
              <table width="200" border="0" cellpadding="0" cellspacing="0">
                <tbody>
                  <tr>
                    <td align="left" class="style14"><span class="style36">Name</span><br />
                        <input name="name" type="text" class="formborder" id="name" size="26" />
                    </td>
                  </tr>
                  <tr>
                    <td align="left"><span class="style37">E-Mail</span><br /> <span class="style229">
                      <input name="email" type="text" class="formborder" id="email" size="26" />
                      </span></td>
                  </tr>
                  <tr>
                    <td align="left"><span class="style229"> <span class="style14">Mobile No. </span><br />
                          <input name="mobile" type="text" class="formborder" id="mobile" size="26" />
                    </span></td>
                  </tr>
                  <tr>
                    <td align="left"><span class="style229"> <span class="style14">City</span><br />
                          <input name="city" type="text" class="formborder" id="city" size="26" />
                    </span></td>
                  </tr>
                  <tr>
                    <td align="left" width="66%"><span class="style229"> <span class="style14">Interested Course </span><br />
                          <input name="course" type="text" class="formborder" id="course" size="26" />
                    </span></td>
                  </tr>
                  <tr>
                    <td align="left" width="66%"><span class="style229"> <span class="style14">Query</span><br />
                          <textarea name="message" cols="23" rows="2" class="formborder" id="message" style="font-family:arial;font-size:10pt"></textarea>
                    </span></td>
                  </tr>
                  <tr>
                    <td align="left"><span class="style229">
                      <label>
                      <input name="mobilealert" type="radio" value="yes" checked="checked" />
                      <span class="style128">Agree to recieve Call / Mail</span></label>
                    </span></td>
                  </tr>
                  <tr>
                    <td align="left"><span class="style229">
                      <input type="submit" name="Submit2" value="Submit">
                    </span></td>
                  </tr>
                </tbody>
              </table>
            </form></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="30">&nbsp;</td>
  </tr>
  <tr>
    <td align="center"><table width="200" height="250" border="0" cellpadding="5" cellspacing="0" background="images\bg4.jpg" bgcolor="#666666">
      <tr>
        <td valign="top"><p align="center" class="style19 style48">Speak to our career counsellors to know best career options for you based on your potentiality. </p>
            <table width="180" height="100" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td align="center" valign="middle"><marquee height="80" direction="up" scrollamount="1" loop="-1">
                  <span class="style175">Call : 7303 73 0033 </span>
                  </marquee>
                </td>
              </tr>
          </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<br />
<br />
</body>
</html>

Comments

Popular posts from this blog

SELECT | INSERT | UPDATE | DELETE CODE IN VB.NET WITH AUTO INCREMENT CONCEPT

Database.vb Imports System.Data.SqlClient Public Class Database     Dim con As New SqlConnection( "Data Source=G20;Initial Catalog=Me;Integrated Security=True" )     Public Sub cnopen()         If con.State = ConnectionState.Open Then             con.Close()         End If         con.Open()     End Sub     Public Sub cnclose()         If con.State <> ConnectionState.Closed Then             con.Close()         End If     End Sub     Public Function Displaygrid( ByVal query As String ) As DataTable         Dim dt As N...

CLASSIFICATION OF OPERATING SYSTEMS

Operating systems can be classified into different types based on their interface, user friendliness, and functionality. Different types of operating systems are: Character user interface (CUI)-based operating systems Graphical user interface (GUI)-based operating systems Single-user operating systems Multi-user operating systems Single-tasking operating systems Multitasking operating systems Real-time operating systems 1. Character User Interface (CUI)-Based Operating Systems: MS-DOS and UNIX (not newer Linux) Such an interface is also called a Command-Line Interface (CLI). 2. Graphical User Interface (GUI)-Based Operating Systems GUI-based operating systems are easy to use because the user can click menus and icons rather than type cryptic commands. Users can use a device called a mouse to select an application, after which the operating system will load and run it. In comparison to a CUI-based operating system, a GUI based operating system is slower and needs ...

TAKE INPUT IN JAVA AS A CHARACTER

 import java.io.*;  public class Charinput {  public static void main(String[] args) throws IOException     {         char ch;         InputStreamReader in = new InputStreamReader(System.in);         BufferedReader br = new BufferedReader(in);         System.out.println("Enter Character : ");         ch=(char)br.read();         System.out.println("Ur Input values : "+ch);    } }