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

IP ADDRESS CLASSES

IP address classes Class 1 st  Octet Decimal Range 1 st  Octet High Order Bits Network/Host ID (N=Network, H=Host) Default Subnet Mask Number of Networks Hosts per Network (Usable Addresses) A 1 – 126* 0 N.H.H.H 255.0.0.0 126 (2 7  – 2) 16,777,214 (2 24  – 2) B 128 – 191 10 N.N.H.H 255.255.0.0 16,382 (2 14  – 2) 65,534 (2 16  – 2) C 192 – 223 110 N.N.N.H 255.255.255.0 2,097,150 (2 21 – 2) 254 (2 8  – 2) D 224 – 239 1110 Reserved for Multicasting E 240 – 254 1111 Experimental; used for research Note:  Class A addresses 127.0.0.0 to 127.255.255.255 cannot be used and is reserved for loopback and diagnostic functions. Private IP Addresses Class Private Networks Subnet Mask Addr...

UNIX/LINUX COMMAND

Unix / Linux Command cat  --- for creating and displaying short files chmod  --- change permissions cd  --- change directory cp  --- for copying files date  --- display date echo  --- echo argument ftp  --- connect to a remote machine to download or upload files grep  --- search file head  --- display first part of file ls  --- see what files you have lpr  --- standard print command (see also  print  ) more  --- use to read files mkdir  --- create directory mv  --- for moving and renaming files ncftp  --- especially good for downloading files via anonymous  ftp . print  --- custom print command (see also  lpr  ) pwd  --- find out what directory you are in rm  --- remove a file rmdir  --- remove directory rsh  --- remote shell setenv  --- set an environment variable sort  --- sort file tail  --- display last part of file ta...

PHP CODE TO DISPLAY IMAGE

<html>     <head>         <title>Img to PHP</title>     </head>     <body>         <?php         $x=0;         echo "<h4>";                echo "<u>LOOP1</u>";                 while($x<=5)                 {                     //echo " ".$x;                     $x++; //$x=$x+1                         ?>         <font color="red">HELLO PHP</font>     <?php     echo ''.$x.'.jpg';     echo "<br>";     echo '<img src='.$x.'.jpg'.' '.'height=50 ...