Thursday 28 February 2013

For supply fellows ....

Reset exams for supply holders are starting
from monday 4-march-2013. Submit your fees
on Friday along with challan form in hbl bank
township branch.
If you can't reach there, just send me your
info and I'll submit your form

Fee: Rs 500/-

download challan form n fill it
First paper on monday is network design management

Wamp Server

Tuesday 26 February 2013

Html code for check box


<HTML>
<HEAD>
<TITLE>JavaScript - Reading Checkboxes and Radio Buttons</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function showBoxes(frm){
   var message = "Your chose:\n\n"

   //For each checkbox see if it has been checked, record the value.
   for (i = 0; i < frm.Music.length; i++)
      if (frm.Music[i].checked){
         message = message + frm.Music[i].value + "\n"
      }

   //For each radio button if it is checked get the value and break.
   for (var i = 0; i < frm.Performer.length; i++){
      if (frm.Performer[i].checked){
         message = message + "\n" + frm.Performer[i].value
         break
      }
   }
   alert(message)
}

//NOTE THE onClick="" empty event handlers in the checkbox and radio input fields below
//are there to fix a bug in Netscape 2.0X. Placing an onClick handler in imput fields fixes
//a bug where input objects inside tables are reflected more than once.

//-->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#ffffff">
<FORM NAME="boxes">
<HR size=1 noshade>
<h2>Music Survey </h2>
<TABLE BORDER="1">
<TR>
  <TD align="right">I enjoy:</TD>
  <TD><INPUT TYPE="Checkbox" NAME="Music" VALUE="Classical" CHECKED onClick="">Classical</TD>
  <TD><INPUT TYPE="Checkbox" NAME="Music" VALUE="Chamber" onClick="">Chamber</TD>
  <TD><INPUT TYPE="Checkbox" NAME="Music" VALUE="Jazz" CHECKED onClick="">Jazz</TD>
  <TD><INPUT TYPE="Checkbox" NAME="Music" VALUE="Rock" onClick="">Rock</TD>
  <TD><INPUT TYPE="Checkbox" NAME="Music" VALUE="Punk" onClick="">Punk</TD>
</TR>
<TR>
  <TD><div align="right">Favourite Performer:</div></TD>
  <TD><INPUT TYPE="radio" NAME="Performer" VALUE="Aitken" onClick="">Aitken</TD>
  <TD><INPUT TYPE="radio" NAME="Performer" VALUE="Coltrane" CHECKED onClick="">Coltrane</TD>
  <TD><INPUT TYPE="radio" NAME="Performer" VALUE="Julliard" onClick="">Julliard</TD>
  <TD><INPUT TYPE="radio" NAME="Performer" VALUE="Kronos" onClick="">Kronos</TD>
  <TD><INPUT TYPE="radio" NAME="Performer" VALUE="Waits" onClick="">Waits</TD>
</TR>
</TABLE>
<P>
<INPUT TYPE="Button" VALUE="Tell Us What You Like!" onClick="showBoxes(this.form);">
</P>
</FORM>
</BODY>
</HTML>

Html code for email validiation_1

<html><head>
<script>
function validateForm()
{
var x=document.forms["myForm"]["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;
  }
  else
  {
        alert("valid email"); 
  }
}
</script>
</head>
<body>
<form name="myForm" onSubmit="return validateForm();" method="post">
Email: <input type="text" name="email">
<input type="submit" value="Submit">
*
</form>


</body>

Html code for email validiation

<html>
<head>
<script>
function validate(form_id,email) {

   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   var address = document.forms[form_id].elements[email].value;//alert(reg.test(address));
   if(reg.test(address) == false) {

      alert('Invalid Email Address');
      return false;
   }
}

</script>
</head>
<body>
<form id="form_id" method="post" action="action.php" onSubmit="javascript:return validate('form_id','email');">

   <input type="text" id="email" name="email" />

   <input type="submit" value="Submit" />
</form>


</body>
</html>

Html code for index

<html>


<body>
<form action="test.php" method="get"  >
  <input type="text" name="name" />
<input type="submit" value="click"/>

</form>

</body>
</html>

Friday 22 February 2013

Slides of Project Management



According to Sir Umer Farooq " I don't provide soft copy of my topic's slides cuz some students misuse it "
OMG someone tell him there is a shit technology called scanner which converts hard copy into soft ............ :P


Click on below link for new slides provided by sir (hard copy) in last lecture




Slides of Project Time Management

All previous slides are under P.Mang Tab ........... :)






Thx Acchoo 4 scanner ............  :)

Monday 18 February 2013

Code 4 form validation ( Simple )

<html>
<head>
      <title>Login Form</title>
</head>

<body
<center>

<h1 style="background-color:white;">log in form </h1>

<hr style="color:white;">

<form method="post" action="abc.php">

First  Name : &nbsp    &nbsp    &nbsp  &nbsp   &nbsp  &nbsp<input type="text" name="text"/>
<br>
<br>

Last Name : &nbsp    &nbsp    &nbsp  &nbsp   &nbsp  &nbsp<input type="text" name="text"/>
<br>
<br>


    Password: &nbsp    &nbsp    &nbsp  &nbsp   &nbsp  &nbsp &nbsp<input type="password" name="pwd"/>
<br>
<br>

Retype-Password: &nbsp<input type="password" name="pwd"/>
<br>
<br>


Email : &nbsp    &nbsp    &nbsp  &nbsp   &nbsp  &nbsp &nbsp &nbsp &nbsp <input type="text" name="text"/>
<br>
<br>


Gender :  &nbsp    &nbsp    &nbsp  &nbsp   &nbsp  &nbsp &nbsp <input type ="radio" name="sex" value="male">Male
         <input type ="radio" name="sex" value="male">Female

<br>
<br>

Date oF Birth : &nbsp    

 <select>

<option selected="selected">-Select Month-</option>
<option>Jan</option>
<option>Feb</option
<option>Mar</option>
<option>Apr</option>
<option>May</option>
</select>


<select>
<option selected="selected">Day</option>
<option>1</option>
<option>2</option
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
</select>

<select>
<option selected="selected">Year</option>
<option>2012</option>
<option>2011</option
<option>2010</option>
<option>2009</option>
<option>2008</option>
<option>2007</option>
<option>2006</option>
</select>

<br>
<br>

<input type="button" value="clear"/>

<input type="submit" value="submit"/>
<br>
<br>





</form>

</center>

</body>
</html>

Code 4 form validation by Bilal

<html>
<head>
      <title>Registration Form</title>
</head>

<body style="background-color:     #5F9EA0;">
<center>

<h1 style="background-color:silver;"><blink>Registration Form</blink> </h1>

<hr style="color:green;">

<form method="post" action="abc.php">

First  Name : &nbsp    &nbsp    &nbsp  &nbsp   &nbsp  &nbsp<input type="text" name="text"/>
<br>
<br>

Last Name : &nbsp    &nbsp    &nbsp  &nbsp   &nbsp  &nbsp<input type="text" name="text"/>
<br>
<br>


    Password: &nbsp    &nbsp    &nbsp  &nbsp   &nbsp  &nbsp &nbsp<input type="password" name="pwd"/>
<br>
<br>

Retype-Password: &nbsp<input type="password" name="pwd"/>
<br>
<br>


Email : &nbsp    &nbsp    &nbsp  &nbsp   &nbsp  &nbsp &nbsp &nbsp &nbsp <input type="text" name="text"/>
<br>
<br>


Retype-Email:  &nbsp    &nbsp    &nbsp  <input type="text" name="text"/>
<br>
<br>

Gender :  &nbsp    &nbsp    &nbsp  &nbsp   &nbsp  &nbsp &nbsp <input type ="radio" name="sex" value="male">Male
         <input type ="radio" name="sex" value="male">Female

<br>
<br>

Date oF Birth : &nbsp    

 <select>

<option selected="selected">-Select Month-</option>
<option>Jan</option>
<option>Feb</option
<option>Mar</option>
<option>Apr</option>
<option>May</option>
</select>


<select>
<option selected="selected">Day</option>
<option>1</option>
<option>2</option
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
</select>

<select>
<option selected="selected">Year</option>
<option>2012</option>
<option>2011</option
<option>2010</option>
<option>2009</option>
<option>2008</option>
<option>2007</option>
<option>2006</option>
</select>

<br>
<br>

&nbsp    &nbsp    &nbsp &nbsp    &nbsp    &nbsp  &nbsp    &nbsp    &nbsp <textarea name="texrarea" >Comments</textarea>
<br>
<br>

<input type="button" value="clear"/>

<input type="submit" value="submit"/>
<br>
<br>





</form>

</center>

</body>
</html>

Code 4 form validation by Atiq

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Msc I.T F11 A32</title>
<style type="text/css">
.font{
    font-size:18px;
}
</style>
<script type="text/javascript">
function validate(){

 var fname = document.getElementById("first").value;
 var lname = document.getElementById("last").value;
 var dob = document.getElementById("dob").value;
 var address = document.getElementById("address").value;
 var country = document.getElementById("country").value;
 var city = document.getElementById("city").value;
 var email = document.getElementById("email").value;
 var pass = document.getElementById("password").value;
 var cpass = document.getElementById("password2").value;
 var father = document.getElementById("fname").value;

 if(!(fname == "")){
        if((fname.length <3)||(isNaN(fname) == false)){
        alert("First Name is Not Valid !");
        }
        else
   if(!(lname == "")){
               if((lname.length <3)||(isNaN(lname) == false)){
        alert("Last Name is Not Valid !");
        }
        else
        if(!(father == "")){
                 if((father.length <3)||(isNaN(father) == false)){
        alert("father Name is Not Valid !");
        }
        else
         if(!(dob == "")){
                    if((dob.length <8)||(isNaN(dob) == false)){
        alert("Date of Birth is Not Valid !");
        }
        else
                if(!(address == "")){
                            if((address.length < 8)||(isNaN(address) == false)){
        alert("Address is Not Valid !");
        }
        else
                    if(!(country == "")){
                                if((country.length <5)||(isNaN(country) == false)){
        alert("country Name is Not Valid !");
        }
        else
                        if(!(city == "")){
                                    if((city.length <5)||(isNaN(city) == false)){
        alert("City Name is Not Valid !");
        }
        else
                            if(!(email == "")){
                                        if((email.length <12)||(isNaN(email) == false)){
        alert("Email Address is Not Valid !");
        }
        else
                                   
                                 if(!(pass == "")){
                                    if(!(cpass == "")){
                                         if(pass.length < 5){
                                            alert("Password length must Greater than 5 !");
                                        }
                                             if(!(pass == cpass)){
                                            alert("Your Password's does not match !");                                               
                                                }
                                                if(isNaN(pass) == false){
                                            alert("Password Must Contain some Alphabets !");                                               
                                                }
                                            }else{
                                            alert("Please Enter Confirm Password !");
                                                }
   
    
                                        }else{
                                        alert("Please Enter  Password !");
                                            }           
                                    
                                    }else{
                                    alert("Please Enter Email Address!");
                                        }
   
    
                                }else{
                                alert("Please Enter your City Name !");
                                    }

    
                            }else{
                            alert("Please Enter Your Country Name !");
                                }
   
    
                        }else{
                        alert("Please Enter Your Address !");
                            }
    
        }else{
        alert("Please Enter Your Date of Birth!");
        }
            
    }else{
    alert("Please Enter Your Father Name !");
    }
   
 }else{
    alert("Please Enter Your Last Name!");
    }
     }else{
    alert("Please Enter Your First Name!");
    }
}
</script>
</head>

<body bgcolor="#999999">
<form action="" method="get">
<br />
<br />
<br />
<br />
<br />
<table align="center" >
<tr>
<td colspan="3">
<label style="font-family:'Courier New', Courier, monospace; font-size:46px; font-weight:bolder; text-align:center; margin-left:30px">
Registration Form
</label>
</td>
</tr>
<tr><td><br /><br /></td></tr>
<tr>
<td>
<label class="font">Name </label>
</td><td>
<input type="text" size="20" class="font"id="first" /></td><td>
<input type="text" size="23" id="last" class="font"/>
</td>
</tr>
<tr>
<td><label class="font">Father Name</label>
</td>
<td colspan="2">
<input class="font" type="text" size="50" id="fname" /></td></tr>
<tr><td >
<label class="font">Date of Birth</label></td>
<td colspan="2"><input class="font" type="text" size="50"  id="dob"/></td>
</tr>
<tr>
<td><label class="font">Gender </label></td>
<td>
<input name="gender" type="radio" class="font" id="gender1"  value="male" checked="checked" />
<label class="font" >Male</label></td>
<td>
<input name="gender" type="radio"  class="font" id="gender2" value="female" />
<label class="font">Female</label>
</td>
</tr>
<tr>
<td >
<label class="font">Address </label>
</td><td colspan="2">
<input type="text" class="font" size="50" id="address" width="300px" /></td>
</tr>
<tr>
<td >
<label class="font">Language</label>
</td><td colspan="2"><select name="language" class="font" id="language" style="width: 425px">
  <option>Arabic</option>
  <option>English</option>
  <option>Urdu</option>
  <option>French</option>
  <option>Spanish</option>
</select></td>
</tr>
<tr><td>
<label class="font" >Country</label>
</td><td colspan="2">
<input type="text"  size="50"class="font" id="country" /></td></tr>
<tr><td>
<label class="font">City</label>
</td><td colspan="2">
<input type="text" size="50"class="font" id="city" /></td></tr>

<tr><td>
<label class="font" >Email Address</label>
</td><td colspan="2">
<input type="email" size="50" class="font" id="email" /></td></tr>


<tr><td>
<label class="font" >Password</label>
</td><td colspan="2">
<input type="password" size="50" class="font" id="password" /></td></tr>
<tr><td>
<label class="font"> Confirm Password</label>
</td><td colspan="2">
<input type="password" size="50" class="font" id="password2" /></td></tr>

<tr><td><br /></td><td></td></tr>
<tr><td></td><td colspan="2">
<input type="button"  style="margin-left:130px; font-size:18px;" value="Validate Data" onclick="validate();" />
</td></tr>
</table>
</form>

</body>
</html>
//fb like box