hi,
I have a application form in which i want to use exactly the same functionality used as in following link
http://my.naukri.com/manager/createacc2.php?othersrcp=5424&wExp=N

I am an asp.net developer.I have no previous exp in javascript.Can any one suggest any method to implement this functionality using asp.net and javascript.

you will need a little bit of css as well as a few js functions to deal with the onchange and onblur events.

you should take some time to view source which would explain much of the behaviors already.

for a start, you can have a validation function:

<script>
function validate(objField, errorRowId)
{
  if(objField.value == "")    document.getElementById(errorRowId).style.display="block";
}
</script>
...
<tr><td><input name="hobby" onblur="validate(this, 'hobbyerror');" ></td></tr>
<tr id="hobbyerror" style="display: none"><td>Error: hobby required</td></tr>
...

try to google for Javascript HTML DOM so that you know what objects you can reference in your js code.

hi,
thanks for the reply,i could achieve individual on blur events,but i could not achieve the functionality when submit button is clicked,that is all the validations has to be displayed.I didnt know how to add individual on blur events to the button click validations.
waiting for u r replies

You will need to check, or call the check functions associated with individual "onblur" to the "onsubmit" event on the collection.
For example:

<form (...etc...) onsubmit="return yourFinalCheckFunction()">

regards.

hi,
thanks for the reply,i could achieve individual on blur events,but i could not achieve the functionality when submit button is clicked,that is all the validations has to be displayed.I didnt know how to add individual on blur events to the button click validations.
waiting for u r replies

Some of the events you can make use of

<input onclick="" onfocus="" onblur="" onchange="">

and to reference these in javascript,

<script>
function validate(objForm)
{
   // accessing value
   objForm.apple.value;
   // assigning function
   objForm.orange.onblur = function() { /* code here; */ };
   // submitting the form programatically
   objForm.submit();

  // other useful methods
  // document.getElementsByTagName(stringTagName)
  // document.getElementsByName(stringName)
  // docuemnt.getElementById(stringId)
}
</script>

<form onsubmit="validate(this); return false;">
<input name="apple" />
<input name="orange" />
<input type="submit" value="submit">
</form>

can u explain it clearly how to intregate on blur events as in the link i have given.I could not understand the code

function clicked()
    {
  
                  var arrmsg = new Array(3);

                                      for(j=0;j<3;j++)
                                          {   
                                               arrmsg[j]="";
                                           }
                 var arrelement = new Array(5);

                                       for(j=0;j<3;j++)
                                         {
                                              arrelement[j] = new Array(2);
                                         }
                    arrelement[0][0] = 'txtname';
                    arrelement[0][1] = 'text';
                    arrelement[1][0] = 'ddldrop';
                    arrelement[1][1] = 'drop';
                    arrelement[2][0] = 'txtemail';
                    arrelement[2][1] = 'email'; 
                    
                    // var flag=false;
                                          for(i=0;i<3;i++)
                                                 { 
                                                  var flag=false;                
                                                     if(arrelement[i][1] == "text")
                                                          { 
                                                              if(checkblank(arrelement[i][0]))
                                                                   {  
                                                                      arrmsg[i] = arrelement[i][0]+"" +"can not be blank";
                                                                      var imgerr=document.getElementById("imgerr"+(i+1));
                                                                      imgerr.style.display="block";
                                                                      var imgcor=document.getElementById("imgcor"+(i+1));
                                                                      imgcor.style.display="none";
                                                                      var lbl=document.getElementById("lblerr"+(i+1));
                                                                      lbl.style.visibility="visible"; 
                                                                      flag= true;
                                                                   }
                                                               else
                                                                   { 
                                                                  
                                                                      var imgerr=document.getElementById("imgerr"+(i+1));
                                                                      imgerr.style.display="none";
                                                                      var imgcor=document.getElementById("imgcor"+(i+1));
                                                                      imgcor.style.display="block";
                                                                      var lbl=document.getElementById("lblerr"+(i+1));
                                                                      lbl.style.visibility="hidden";
                                                                      flag=false;
                                                                   }
                                                          }
                                                   if(arrelement[i][1] == "drop")
                                                         { 
                                                                if(checkdrop(arrelement[i][0]))
                                                                 {   
                                                                    var imgerr=document.getElementById("imgerr"+(i+1));
                                                                    imgerr.style.display="block";
                                                                    var imgcor=document.getElementById("imgcor"+(i+1));
                                                                    imgcor.style.display="none";
                                                                    var lbl=document.getElementById("lblerr"+(i+1));
                                                                    lbl.style.visibility="visible";
                                                                    flag= true;
                                                                 }
                                                              else
                                                                {    
                                                                      var imgerr=document.getElementById("imgerr"+(i+1));
                                                                      imgerr.style.display="none";
                                                                      var imgcor=document.getElementById("imgcor"+(i+1));
                                                                      imgcor.style.display="block";
                                                                      var lbl=document.getElementById("lblerr"+(i+1));
                                                                      lbl.style.visibility="hidden";
                                                                      flag=false; 
                                                                }
                                                         }
                                                   if(arrelement[i][1] == "email")
                                                         { 
                                                                if(checkblank(arrelement[i][0]))
                                                                 {  
                                                                      var imgerr=document.getElementById("imgerr"+(i+1));
                                                                      imgerr.style.display="block";
                                                                      var imgcor=document.getElementById("imgcor"+(i+1));
                                                                      imgcor.style.display="none";
                                                                      var lbl=document.getElementById("lblerr"+(i+1));
                                                                      lbl.innerHTML ="Please enter email";
                                                                      lbl.style.visibility="visible";
                                                                      flag= true;
                                                                 }
                                                                else
                                                                 {
                                                                    if(checkemail(arrelement[i][0]))
                                                                        {
                                                                           var imgerr=document.getElementById("imgerr"+(i+1));
                                                                           imgerr.style.display="block";
                                                                           var imgcor=document.getElementById("imgcor"+(i+1));
                                                                           imgcor.style.display="none";
                                                                           var lbl=document.getElementById("lblerr"+(i+1));
                                                                           lbl.innerHTML ="Invalid Email ID";
                                                                           lbl.style.visibility="visible";
                                                                           flag= true;
                                                                          
                                                                        }
                                                                     else
                                                                         {
                                                                            
                                                                           var imgerr=document.getElementById("imgerr"+(i+1));
                                                                           imgerr.style.display="none";
                                                                           var imgcor=document.getElementById("imgcor"+(i+1));
                                                                           imgcor.style.display="block";
                                                                           var lbl=document.getElementById("lblerr"+(i+1));
                                                                           lbl.style.visibility="hidden";
                                                                           flag=false;
                                                                          }
                                                                  }
                          
                      
                                                           }

                                             }
              
                      if(flag==false)
                              {
                                 
                                  return true;
                              }
                          else
                             {
                                return false;
                             }
     
     }
 function checkblank(field)
    { 
           if(document.getElementById(field).value == "")
                  
              return true;
           else
              return false;
    }
    function checkdrop(field)
    {
        if(document.getElementById(field).value == "Select")
                  return true;
           else
              return false;
    }
    function checkemail(field)
    {
      mi=document.getElementById(field).value; 

	if(mi > "")
	{
		var temp=new Array();
		temp=mi.split('@');
		if(temp.length > 2)
		{
//		alert("Invalid Email Address");
		return true;
		}
		if(mi.indexOf("@")==-1 || mi.indexOf(".") == -1)
		{
//		alert("Invalid Email Id");
		return true;
		}
		if((mi.indexOf("@")==mi.indexOf(".")-1))
		{
//		alert("Invalid Email Id");
		return true;
		}
		var str = "!#$%^&*()-+/\{}';:`~";
		for(j=0;j<str.length;j++)
		{
		 if(mi.indexOf(str.charAt(j)) != -1)
		 {
//		 alert("Invalid Email Address");
		 return true;
		 }
		} 
		return false; 
	  }
    }
    
</script>
 <form id="form1" runat="server">
    <div>
    <table>
    <tr>
    <td>
    <asp:Label ID="lblname" runat="server" Text="label"></asp:Label>
    
    </td>
    <td>
       <table>
    <tr>
    <td>    <asp:TextBox ID="txtname" runat="server"></asp:TextBox>
				</td>
    <td>  <asp:Image ID="imgcor1" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" /><asp:Image ID="imgerr1" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" /></td>
    <td>  <asp:Label ID="lblerr1" runat="server" Font-Bold="false" style="visibility:hidden" ForeColor="red"></asp:Label></td>
    
    </tr>
    </table>
   
    </td>
    </tr>
    <tr>
    <td>
    <asp:Label ID="lbldrop" runat="server" Text="dropdown"></asp:Label>
    </td>
    <td>
     <table>
    <tr>
    <td>    <asp:DropDownList ID="ddldrop" runat="server" >
        <asp:ListItem>Select</asp:ListItem>
        <asp:ListItem>test1</asp:ListItem>
        <asp:ListItem>test2</asp:ListItem>
    </asp:DropDownList>
				</td>
    <td>  <asp:Image ID="imgcor2" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" /><asp:Image ID="imgerr2" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" /></td>
   <td>  <asp:Label ID="lblerr2" runat="server" Font-Bold="false" style="visibility:hidden" ForeColor="red"></asp:Label></td>
   
    </tr>
    </table>
 
    </td>
    </tr>
    <tr>
    <td>
    <asp:Label ID="lblmob" runat="server" Text="Land Line"></asp:Label>
    </td>
    <td>
    <table>
    <tr>
    <td> <asp:TextBox ID="txtcountrycode" Runat="server" Width="40px"></asp:TextBox>&nbsp;-&nbsp;&nbsp;
				<asp:TextBox ID="txtcon1" Runat="server" Width="40px"></asp:TextBox>&nbsp;-&nbsp;&nbsp;
				<asp:textbox id="txtcon2" Runat="server"></asp:textbox></td>
  <td>  <asp:Image ID="imgcor4" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" /><asp:Image ID="imgerr4" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" /></td>
   <td>  <asp:Label ID="lblerr4" runat="server" Font-Bold="false" style="visibility:hidden" ForeColor="red"></asp:Label></td>
    </tr>
    </table>
    </td>
   </tr>
   <tr>
    <td>
    <asp:Label ID="Label1" runat="server" Text="Mobile"></asp:Label>
    </td>
    <td>
    <table>
    <tr>
    <td> <asp:TextBox ID="txtmob" Runat="server" Width="40px"></asp:TextBox>&nbsp;-&nbsp;&nbsp;
				<asp:TextBox ID="txtcon3" Runat="server" ></asp:TextBox>
		</td>
    <td>  <asp:Image ID="imgcor5" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" /><asp:Image ID="imgerr5" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" /></td>
    <td>  <asp:Label ID="lblerr5" runat="server" Font-Bold="false" style="visibility:hidden" ForeColor="red"></asp:Label></td>
    </tr>
    </table>
    </td>
   </tr>
   <tr>
   <td>
   <asp:Label ID="lblemail" runat="server" Text="Email"></asp:Label>
   </td>
   <td>
   <table>
    <tr>
    <td>  <asp:TextBox ID="txtemail" runat="server"></asp:TextBox></td>
    <td>  <asp:Image ID="imgcor3" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" /><asp:Image ID="imgerr3" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" /></td>
   <td>  <asp:Label ID="lblerr3" runat="server" style="visibility:hidden" Font-Bold="false"  ForeColor="red"></asp:Label></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td colspan="2" align="center">
  <asp:Button ID="btnsubmit" runat="server" Text="Submit" OnClick="btnsubmit_Click" />
  
  </td>
  
  </tr>
    </table>
    </div>
    </form>

this is the code iam using,but as we validate email,the page is posted back with out checking for other validations.I want to use the javascript as used in the link,but i could not understand the script given in view source.can any one give brief idea on how to do it

Hi,

I can't run your code because it's not HTML, and I don't have ASP server.

I'm predominantly at PHP and only wrote in ASP once or twice, so at best, I am not an ASP expert but the webpage you are trying to imitate is a PHP page. So I may be able to give u some idea of its structure which I think you should use it in your ASP programming. Posting in ASP forum might help.

The code you posted here is using ASP controls instead of HTML controls which quite complicate things if you are going to do client side validation with Javascript and HTML DOM. (ASP might render HTML controls so that Javascript can pick them up, but i don't know if there is full compatibility given that MS doesn't like to follow standards)

The way we do it in PHP is to separate the form user interface (HTML) with the server-side save-to-database-procedures (PHP/ASP) by using clean HTML controls and posting the variables to the PHP/ASP script at the point of submission.

<!-- create HTML controls, and post the variables to myscript.aspx to do db processing instead of relying on ASP controls -->
<form method="POST" action="myscript.aspx" onsubmit="validate(this); return false;">
<input type="text" value="hobby" onblur="check('error_txt');" />
<p id="error_txt" style="display: hidden;">Error - hobby is required</p>
<input type="submit" value="send" onblur="check('error_txt');" />
</form>

<!-- the onsubmit event of the HTML form element tells javascript to validate itself before submitting. the "return false;" cancels the default behavior of the [input type="submit"] and allows javascript function validate() to run -->

with the above HTML snippet, javascript will be able to pick up the various HTML elements and work on them. Without HTML controls, you got to make sure ASP generates the correct HTML elements and their attributes. For example, ASP form control does not generate a onsubmit event for the generated HTML control by default:

<form runat="server">

gives you

<form name="_ctl0" method="post" action="page.aspx" id="_ctl0">

At best, it looks like wasted bandwidth. and you got other limitations like you can't have more than one ASP form control etc...

So your issue now is to get ASP to generate the correct HTML that javascript can read first OR manually write your own HTML form elements.

function clicked()
    {
  
                  var arrmsg = new Array(3);

                                      for(j=0;j<3;j++)
                                          {   
                                               arrmsg[j]="";
                                           }
                 var arrelement = new Array(5);

                                       for(j=0;j<3;j++)
                                         {
                                              arrelement[j] = new Array(2);
                                         }
                    arrelement[0][0] = 'txtname';
                    arrelement[0][1] = 'text';
                    arrelement[1][0] = 'ddldrop';
                    arrelement[1][1] = 'drop';
                    arrelement[2][0] = 'txtemail';
                    arrelement[2][1] = 'email'; 
                    
                    // var flag=false;
                                          for(i=0;i<3;i++)
                                                 { 
                                                  var flag=false;                
                                                     if(arrelement[i][1] == "text")
                                                          { 
                                                              if(checkblank(arrelement[i][0]))
                                                                   {  
                                                                      arrmsg[i] = arrelement[i][0]+"" +"can not be blank";
                                                                      var imgerr=document.getElementById("imgerr"+(i+1));
                                                                      imgerr.style.display="block";
                                                                      var imgcor=document.getElementById("imgcor"+(i+1));
                                                                      imgcor.style.display="none";
                                                                      var lbl=document.getElementById("lblerr"+(i+1));
                                                                      lbl.style.visibility="visible"; 
                                                                      flag= true;
                                                                   }
                                                               else
                                                                   { 
                                                                  
                                                                      var imgerr=document.getElementById("imgerr"+(i+1));
                                                                      imgerr.style.display="none";
                                                                      var imgcor=document.getElementById("imgcor"+(i+1));
                                                                      imgcor.style.display="block";
                                                                      var lbl=document.getElementById("lblerr"+(i+1));
                                                                      lbl.style.visibility="hidden";
                                                                      flag=false;
                                                                   }
                                                          }
                                                   if(arrelement[i][1] == "drop")
                                                         { 
                                                                if(checkdrop(arrelement[i][0]))
                                                                 {   
                                                                    var imgerr=document.getElementById("imgerr"+(i+1));
                                                                    imgerr.style.display="block";
                                                                    var imgcor=document.getElementById("imgcor"+(i+1));
                                                                    imgcor.style.display="none";
                                                                    var lbl=document.getElementById("lblerr"+(i+1));
                                                                    lbl.style.visibility="visible";
                                                                    flag= true;
                                                                 }
                                                              else
                                                                {    
                                                                      var imgerr=document.getElementById("imgerr"+(i+1));
                                                                      imgerr.style.display="none";
                                                                      var imgcor=document.getElementById("imgcor"+(i+1));
                                                                      imgcor.style.display="block";
                                                                      var lbl=document.getElementById("lblerr"+(i+1));
                                                                      lbl.style.visibility="hidden";
                                                                      flag=false; 
                                                                }
                                                         }
                                                   if(arrelement[i][1] == "email")
                                                         { 
                                                                if(checkblank(arrelement[i][0]))
                                                                 {  
                                                                      var imgerr=document.getElementById("imgerr"+(i+1));
                                                                      imgerr.style.display="block";
                                                                      var imgcor=document.getElementById("imgcor"+(i+1));
                                                                      imgcor.style.display="none";
                                                                      var lbl=document.getElementById("lblerr"+(i+1));
                                                                      lbl.innerHTML ="Please enter email";
                                                                      lbl.style.visibility="visible";
                                                                      flag= true;
                                                                 }
                                                                else
                                                                 {
                                                                    if(checkemail(arrelement[i][0]))
                                                                        {
                                                                           var imgerr=document.getElementById("imgerr"+(i+1));
                                                                           imgerr.style.display="block";
                                                                           var imgcor=document.getElementById("imgcor"+(i+1));
                                                                           imgcor.style.display="none";
                                                                           var lbl=document.getElementById("lblerr"+(i+1));
                                                                           lbl.innerHTML ="Invalid Email ID";
                                                                           lbl.style.visibility="visible";
                                                                           flag= true;
                                                                          
                                                                        }
                                                                     else
                                                                         {
                                                                            
                                                                           var imgerr=document.getElementById("imgerr"+(i+1));
                                                                           imgerr.style.display="none";
                                                                           var imgcor=document.getElementById("imgcor"+(i+1));
                                                                           imgcor.style.display="block";
                                                                           var lbl=document.getElementById("lblerr"+(i+1));
                                                                           lbl.style.visibility="hidden";
                                                                           flag=false;
                                                                          }
                                                                  }
                          
                      
                                                           }

                                             }
              
                      if(flag==false)
                              {
                                 
                                  return true;
                              }
                          else
                             {
                                return false;
                             }
     
     }
 function checkblank(field)
    { 
           if(document.getElementById(field).value == "")
                  
              return true;
           else
              return false;
    }
    function checkdrop(field)
    {
        if(document.getElementById(field).value == "Select")
                  return true;
           else
              return false;
    }
    function checkemail(field)
    {
      mi=document.getElementById(field).value; 

	if(mi > "")
	{
		var temp=new Array();
		temp=mi.split('@');
		if(temp.length > 2)
		{
//		alert("Invalid Email Address");
		return true;
		}
		if(mi.indexOf("@")==-1 || mi.indexOf(".") == -1)
		{
//		alert("Invalid Email Id");
		return true;
		}
		if((mi.indexOf("@")==mi.indexOf(".")-1))
		{
//		alert("Invalid Email Id");
		return true;
		}
		var str = "!#$%^&*()-+/\{}';:`~";
		for(j=0;j<str.length;j++)
		{
		 if(mi.indexOf(str.charAt(j)) != -1)
		 {
//		 alert("Invalid Email Address");
		 return true;
		 }
		} 
		return false; 
	  }
    }
    
</script>
 <form id="form1" runat="server">
    <div>
    <table>
    <tr>
    <td>
    <asp:Label ID="lblname" runat="server" Text="label"></asp:Label>
    
    </td>
    <td>
       <table>
    <tr>
    <td>    <asp:TextBox ID="txtname" runat="server"></asp:TextBox>
				</td>
    <td>  <asp:Image ID="imgcor1" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" /><asp:Image ID="imgerr1" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" /></td>
    <td>  <asp:Label ID="lblerr1" runat="server" Font-Bold="false" style="visibility:hidden" ForeColor="red"></asp:Label></td>
    
    </tr>
    </table>
   
    </td>
    </tr>
    <tr>
    <td>
    <asp:Label ID="lbldrop" runat="server" Text="dropdown"></asp:Label>
    </td>
    <td>
     <table>
    <tr>
    <td>    <asp:DropDownList ID="ddldrop" runat="server" >
        <asp:ListItem>Select</asp:ListItem>
        <asp:ListItem>test1</asp:ListItem>
        <asp:ListItem>test2</asp:ListItem>
    </asp:DropDownList>
				</td>
    <td>  <asp:Image ID="imgcor2" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" /><asp:Image ID="imgerr2" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" /></td>
   <td>  <asp:Label ID="lblerr2" runat="server" Font-Bold="false" style="visibility:hidden" ForeColor="red"></asp:Label></td>
   
    </tr>
    </table>
 
    </td>
    </tr>
    <tr>
    <td>
    <asp:Label ID="lblmob" runat="server" Text="Land Line"></asp:Label>
    </td>
    <td>
    <table>
    <tr>
    <td> <asp:TextBox ID="txtcountrycode" Runat="server" Width="40px"></asp:TextBox>&nbsp;-&nbsp;&nbsp;
				<asp:TextBox ID="txtcon1" Runat="server" Width="40px"></asp:TextBox>&nbsp;-&nbsp;&nbsp;
				<asp:textbox id="txtcon2" Runat="server"></asp:textbox></td>
  <td>  <asp:Image ID="imgcor4" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" /><asp:Image ID="imgerr4" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" /></td>
   <td>  <asp:Label ID="lblerr4" runat="server" Font-Bold="false" style="visibility:hidden" ForeColor="red"></asp:Label></td>
    </tr>
    </table>
    </td>
   </tr>
   <tr>
    <td>
    <asp:Label ID="Label1" runat="server" Text="Mobile"></asp:Label>
    </td>
    <td>
    <table>
    <tr>
    <td> <asp:TextBox ID="txtmob" Runat="server" Width="40px"></asp:TextBox>&nbsp;-&nbsp;&nbsp;
				<asp:TextBox ID="txtcon3" Runat="server" ></asp:TextBox>
		</td>
    <td>  <asp:Image ID="imgcor5" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" /><asp:Image ID="imgerr5" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" /></td>
    <td>  <asp:Label ID="lblerr5" runat="server" Font-Bold="false" style="visibility:hidden" ForeColor="red"></asp:Label></td>
    </tr>
    </table>
    </td>
   </tr>
   <tr>
   <td>
   <asp:Label ID="lblemail" runat="server" Text="Email"></asp:Label>
   </td>
   <td>
   <table>
    <tr>
    <td>  <asp:TextBox ID="txtemail" runat="server"></asp:TextBox></td>
    <td>  <asp:Image ID="imgcor3" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" /><asp:Image ID="imgerr3" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" /></td>
   <td>  <asp:Label ID="lblerr3" runat="server" style="visibility:hidden" Font-Bold="false"  ForeColor="red"></asp:Label></td>
    </tr>
    </table>
  </td>
  </tr>
  <tr>
  <td colspan="2" align="center">
  <asp:Button ID="btnsubmit" runat="server" Text="Submit" OnClick="btnsubmit_Click" />
  
  </td>
  
  </tr>
    </table>
    </div>
    </form>

Sorry but where [on this overload of code] are you calling the most important "function clicked()" before submiting the form?
:)
I allready gave you the CORRECT answer.

At the top of code u can see function clicked()

At the top of code u can see function clicked()

I was asking about the: "function CALL".
The thing you are pointing to, is a "function DEFINITION"

This is the same as if you've spent a lot of money to make some party, but you never invited anyone. Everything you bought is lying there unused while wondering why the party is somehow never happening.

Cheers.

HI,
i have solved it ,For those who want to achive this functionality

<head runat="server">
    <title>Apply Online</title>
     <link href="EtgsImages/StyleSheet.css" type="text/css" rel="stylesheet" />
	<link href="EtgsImages/ETGS.css" rel="stylesheet" />
	<script src="EtgsImages/validations.js" type="text/javascript"></script>
	<script src="EtgsImages/JScript1.js" type="text/javascript" ></script>
	<script src="EtgsImages/datetimepicker.js"  type="text/javascript"></script>
	
	
	<!-- for datetime picker -->
	<script src="EtgsImages/DatePicker/mootools.v1.11.js" type="text/javascript"></script>
    <script src="EtgsImages/DatePicker/DatePicker.js" type="text/javascript"></script>
    <link href="EtgsImages/DatePicker/Cal_Style.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="EtgsImages/DatePicker/Call_Calender.js"></script>
	
	
	<script event="onchange" for="icountry">
	    document.getElementById("txtcountrycode").value = document.getElementById("icountry").value;
	    document.getElementById("txtccode").value = document.getElementById("icountry").value;
	 
	</script>
	<%--<script event="onclick" for="rbagree">
	    alert(document.form1.rbagree.checked);
	    document.form1.btnAgrred.disabled = false;
	</script>--%>
	
	txtemail
	v_nationality(nm)
	<script language="javascript">
	    function validateform()
    {
              count=0;
                              if(!v_title('ddltitle'))
                                {
                                    count=count+1;
                                }
                              if(!v_firstname('txtfirstname'))
                               {
                                   count=count+1;
                               }
                              if(!v_familyname('txtfamilyname'))
                                {
                                   count=count+1;
                                }
                             if(!v_address('txtaddr'))
                               {
                                  count=count+1;
                               }
                            if(!v_city('txtcity'))
                               {
                                 count=count+1;
                               }
                            if(!v_state('txtstate'))
                              {
                                 count=count+1;
                              }
                            if(!v_zipcode('txtzipcode'))
                              {
                                 count=count+1;
                              }
                             if(!v_email('txtemail'))
                             {
                                count=count+1;
                             }
                             if(!v_dob('txtdob'))
                             {
                                count=count+1;
                             }
                             if(!v_nationality('txtnationality'))
                             {
                                count=count+1;
                             }
                             if(!v_pname('txtPName'))
                             {
                                count=count+1;
                             }
                             if(!v_paddress('txtPAddr'))
                             {
                               count=count+1;
                             }
                             if(!v_prelation('txtPRelationship'))
                             {
                              count=count+1;
                             }
                               if(!v_poccupation('txtPOccupation'))
                             {
                               count=count+1;
                             }
          if(count==0)
          {
            return true;
          }
          else
           {
            return false;
           }
   
    }
    function v_title(nm)
     {
    
        var mn=document.getElementById(nm);
        if(mn.value=="Select")
               { 
                  showerrorcss(mn,'imgerror1','imgcorrect1','usermsg1','please select Title');
                  return false;
               }
        else
               {
                   hidecss(mn,'imgerror1','imgcorrect1','usermsg1');
                   return true;
               }
    }
    function v_firstname(nm)
    {
       var mn=document.getElementById(nm);
       if(mn.value=="")
               { 
                  showerrorcss1(mn,'imgerror2','imgcorrect2','usermsg2','please enter first name');
                  return false;
               }
      else
               {
                  hidecss1(mn,'imgerror2','imgcorrect2','usermsg2');
                  return true;
               }
    }
    
     function v_familyname(nm)
    {
       var mn=document.getElementById(nm);
       if(mn.value=="")
               { 
                  showerrorcss1(mn,'imgerror3','imgcorrect3','usermsg3','please enter family name');
                  return false;
               }
      else
               {
                  hidecss1(mn,'imgerror3','imgcorrect3','usermsg3');
                  return true;
                }
    }
    function v_address(nm)
     {
    
        var mn=document.getElementById(nm);
        if(mn.value=="")
               { 
                  showerrorcss1(mn,'imgerror4','imgcorrect4','usermsg4','please enter address');
                  return false;
               }
        else
               {
                   hidecss1(mn,'imgerror4','imgcorrect4','usermsg4');
                   return true;
                }
    }
      function v_city(nm)
     {
    
        var mn=document.getElementById(nm);
        if(mn.value=="")
               { 
                  showerrorcss1(mn,'imgerror5','imgcorrect5','usermsg5','please enter City');
                  return false;
               }
        else
               {
                   hidecss1(mn,'imgerror5','imgcorrect5','usermsg5');
                   return true;
                }
    }
      function v_state(nm)
     {
    
        var mn=document.getElementById(nm);
        if(mn.value=="")
               { 
                  showerrorcss1(mn,'imgerror6','imgcorrect6','usermsg6','please enter State');
                  return false;
               }
        else
               {
                   hidecss1(mn,'imgerror6','imgcorrect6','usermsg6');
                   return true;
                }
    }
     function v_zipcode(nm)
     {
    
        var mn=document.getElementById(nm);
        if(mn.value=="")
               { 
                  showerrorcss1(mn,'imgerror7','imgcorrect7','usermsg7','please enter zipcode');
                  return false;
               }
        else
               { 
                           if(IsValidInteger(mn.value))
                             {
                                   hidecss1(mn,'imgerror7','imgcorrect7','usermsg7');
                                   return true;
                             }
                             else
                             {
                                  showerrorcss1(mn,'imgerror7','imgcorrect7','usermsg7','please enter valid zipcode with numbers');
                                  return false;
                             }
                }
    }
     function v_email(nm)
     {
    
        var mn=document.getElementById(nm);
       if(mn.value=="")
       {
        showerrorcss1(mn,'imgerror8','imgcorrect8','usermsg8','Please enter email');
        return false;
       }
       else
       {
                 if(checkemail(nm))
                        { 
                             hidecss1(mn,'imgerror8','imgcorrect8','usermsg8');
                             return true;
                           
                        }
                 else
                        { 
                            showerrorcss1(mn,'imgerror8','imgcorrect8','usermsg8','Invalid EmailID');
                            return false;
                        }
       }
    }
     function v_dob(nm)
     {
    
        var mn=document.getElementById(nm);
        if(mn.value=="")
               { 
                  showerrorcss1(mn,'imgerror10','imgcorrect10','usermsg10','please enter Date of birth');
                  return false;
               }
        else
               {
                   hidecss1(mn,'imgerror10','imgcorrect10','usermsg10');
                   return true;
                }
    }
    function v_nationality(nm)
     {
    
        var mn=document.getElementById(nm);
        if(mn.value=="")
               { 
                  showerrorcss1(mn,'imgerror11','imgcorrect11','usermsg11','please enter Nationality');
                  return false;
               }
        else
               {
                   hidecss1(mn,'imgerror11','imgcorrect11','usermsg11');
                   return true;
                }
    }
    function v_pname(nm)
     {
    
        var mn=document.getElementById(nm);
        if(mn.value=="")
               { 
                  showerrorcss1(mn,'imgerror12','imgcorrect12','usermsg12','please enter Name');
                  return false;
               }
        else
               {
                   hidecss1(mn,'imgerror12','imgcorrect12','usermsg12');
                   return true;
                }
    }
    function v_paddress(nm)
     {
        var mn=document.getElementById(nm);
        if(mn.value=="")
               { 
                  showerrorcss1(mn,'imgerror13','imgcorrect13','usermsg13','please enter Address');
                  return false;
               }
        else
               { 
                        hidecss1(mn,'imgerror13','imgcorrect13','usermsg13'); 
                        var txt1=document.getElementById("txtPRelationship");
                        var txt2=document.getElementById("txtPOccupation");
                           if(mn.value=="as above")
                             {
                                     txt1.disabled=true;
                                     txt2.disabled=true;  
                                     hidecss1(txt1,'imgerror14','imgcorrect14','usermsg14');
                                     hidecss1(txt2,'imgerror15','imgcorrect15','usermsg15');
                                    
                             }
                             if(mn.value!="as above")
                             {
                                   txt1.removeAttribute('disabled');
                                   txt2.removeAttribute('disabled');
                             }
                        return true;
                           
                }
    }
    function v_prelation(nm)
     {
    
        var mn=document.getElementById(nm);
        if((mn.value=="")&& (mn.disabled==false))
               { 
                  showerrorcss1(mn,'imgerror14','imgcorrect14','usermsg14','please enter Relationship');
                  return false;
               }
        else
               {
                   hidecss1(mn,'imgerror14','imgcorrect14','usermsg14');
                   return true;
                }
    }
    function v_poccupation(nm)
     {
    
        var mn=document.getElementById(nm);
        if((mn.value=="")&& (mn.disabled==false))
               { 
                  showerrorcss1(mn,'imgerror15','imgcorrect15','usermsg15','please enter Occupation');
                  return false;
               }
        else
               {
                   hidecss1(mn,'imgerror15','imgcorrect15','usermsg15');
                   return true;
                }
    }
    
    function IsValidInteger( varStr )
    {
	           var aDigits = "1234567890";
	
	               for (var i=0; i<varStr.length; i++) 
	                   {
		                 if (aDigits.indexOf(varStr.charAt(i)) == -1)
		                  {
			                    return false;
		                   }
	                   }
	    return true;
    }
    
    function checkemail(field)
    {
      mi=document.getElementById(field).value; 

	if(mi > "")
	{
		var temp=new Array();
		temp=mi.split('@');
		if(temp.length > 2)
		{
//		alert("Invalid Email Address");
		return false;
		}
		if(mi.indexOf("@")==-1 || mi.indexOf(".") == -1)
		{
//		alert("Invalid Email Id");
		return false;
		}
		if((mi.indexOf("@")==mi.indexOf(".")-1))
		{
//		alert("Invalid Email Id");
		return false;
		}
		var str = "!#$%^&*()-+/\{}';:`~";
		for(j=0;j<str.length;j++)
		{
		 if(mi.indexOf(str.charAt(j)) != -1)
		 {
//		 alert("Invalid Email Address");
		 return false;
		 }
		} 
		return true; 
	  }
    }
    
     function showerrorcss1(ob,imgerr,imgcor,lblerr,lblmsg)
    {
     ob.style.border="1px solid #ff0000";
     var imgerror=document.getElementById(imgerr);
     imgerror.style.display="block";
     var imgcorrect=document.getElementById(imgcor);
     imgcorrect.style.display="none";
     var lbl=document.getElementById(lblerr);
     lbl.style.visibility='visible';
     lbl.innerHTML=lblmsg;
    
    }
    function hidecss1(ob,imgerr,imgcor,lblerr)
    {
     ob.removeAttribute('style');
     ob.className ="";
     var imgerror=document.getElementById(imgerr);
     imgerror.style.display="none";
     var imgcorrect=document.getElementById(imgcor);
     imgcorrect.style.display="block";
     var lbl=document.getElementById(lblerr);
     lbl.innerHTML="";
     lbl.style.visibility='hidden';

    } 
    
    function showerrorcss(ob,imgerr,imgcor,lblerr,lblmsg)
    {
     ob.parentNode.style.border="1px solid #ff0000";
     var imgerror=document.getElementById(imgerr);
     imgerror.style.display="block";
     var imgcorrect=document.getElementById(imgcor);
     imgcorrect.style.display="none";
     var lbl=document.getElementById(lblerr);
     lbl.style.visibility='visible';
     lbl.innerHTML=lblmsg;
    
    }
    function hidecss(ob,imgerr,imgcor,lblerr)
    {
     ob.parentNode.removeAttribute('style');
     ob.parentNode.className ="";
     var imgerror=document.getElementById(imgerr);
     imgerror.style.display="none";
     var imgcorrect=document.getElementById(imgcor);
     imgcorrect.style.display="block";
     var lbl=document.getElementById(lblerr);
     lbl.innerHTML="";
     lbl.style.visibility='hidden';

    } 
	</script>
</head>
<body style="background-color:#efefef" onload="GetCode()">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    <div>
  <asp:Panel ID="PanelStudentDetails" runat="server" Width="91%" style="padding-left:30px">
    <fieldset>
        <legend>&nbsp;
        <span class="style3"><strong>
		        <font color="#000099"><font face="Arial, Helvetica, sans-serif" color="#006699">
		        Please provide your personal details</font></font></strong></span>
        &nbsp;</legend>
        <table>
	<tr><td></td></tr>
	    
	    <tr align="left">
		    <td colspan="2"><asp:label id="lblmsg" ForeColor="red" Runat="server"></asp:label></td>
		</tr>
		<tr align="left">
		    <td colspan="2"></td>
		</tr>
		<tr align="left">
	        <td style="padding-left:20px"><asp:label id="lblcountry" text="Country Name" Font-Bold="True" Runat="server"></asp:label></td>
			<td>
			<table>
			    <tr>
			        <td>
			            <asp:dropdownlist id="icountry" Runat="server"></asp:dropdownlist>        
			        </td>
			    </tr>
			</table>
			</td>
		</tr>
		<tr><td colspan="2"></td></tr>
		
		<tr align="left">
		    <td style="height: 27px;padding-left:20px"><asp:label id="lbltitle" Runat="server" Text="Title"></asp:label></td>
			<td>
			<table>
			    <tr>
			        <td>
			            <asp:dropdownlist id="ddltitle" Runat="server">
    			    <asp:ListItem Value="Select" Selected="True">Please Select</asp:ListItem>
				    <asp:ListItem Value="Mr">Mr</asp:ListItem>
				    <asp:ListItem Value="Mrs">Mrs</asp:ListItem>
                    <asp:ListItem Value="Ms">Ms</asp:ListItem>
                    <asp:ListItem Value="Dr">Dr</asp:ListItem>
				</asp:dropdownlist>        
			        </td>
			        <td>
			            <asp:Image ID="imgcorrect1" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" />
				<asp:Image ID="imgerror1" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" />    
			        </td>
			        <td>
                        <asp:Label ID="usermsg1" runat="server" Font-Bold="False"  ForeColor="Red"></asp:Label>			        
			        </td>
			    </tr>
			</table>
			</td>
		</tr>
		
		<tr><td colspan="2"></td></tr>
		<tr align="left">
		    <td style="padding-left:20px"><asp:label id="lblfirstname" Runat="server" Text="First Name"></asp:label></td>
			<td>
			<table>
			<tr>
			
			<td>
			        <asp:textbox id="txtfirstname" Runat="server" Width="145px"></asp:textbox>
			</td>
			<td>
		       <asp:Image ID="imgcorrect2" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" />
    	       <asp:Image ID="imgerror2" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" />
			</td>
			<td>
	    		    <asp:Label ID="usermsg2" runat="server" Font-Bold="False"  ForeColor="Red"></asp:Label>    
	    	</td>	    
	        <td>
	            <asp:textbox id="txtfamilyname" Runat="server" Width="145px"></asp:textbox>&nbsp;
	        </td>
	            
            <td>
   			    <asp:Image ID="imgcorrect3" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" />
			    <asp:Image ID="imgerror3" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" />
		    </td>
		    <td>
    		    <asp:Label ID="usermsg3" runat="server" Font-Bold="False"  ForeColor="Red"></asp:Label>
            </td>
            
            </tr>
	        </table> 		
			  <%--  <cc1:TextBoxWatermarkExtender ID="WExtFirstName" runat="server" TargetControlID="txtfirstname" WatermarkText="First Name" WatermarkCssClass="wm"></cc1:TextBoxWatermarkExtender>
			    <cc1:TextBoxWatermarkExtender ID="WExtFamilyName" runat="server" TargetControlID="txtfamilyname" WatermarkText="Family Name" WatermarkCssClass="wm"></cc1:TextBoxWatermarkExtender>	    --%>
			</td>
		 </tr>	    
		<tr align="left">
		    <td style="padding-left:20px"><asp:label id="lblgender" Runat="server" Text="Gender"></asp:label></td>
			<td><asp:radiobuttonlist id="rblgender" Runat="server" RepeatDirection="horizontal">
			    <asp:ListItem Value="Male" Selected="True">Male</asp:ListItem>
				<asp:ListItem Value="Female">Female</asp:ListItem>
				</asp:radiobuttonlist>
			</td>
		</tr>
		<tr><td colspan="2"></td></tr>
		<tr align="left">
		    <td style="padding-left:20px"><asp:label id="lblmstatus" Runat="server" Text="Marital Status"></asp:label></td>
			<td><asp:radiobuttonlist id="rbmstatus" Runat="server" RepeatDirection="Horizontal">
			    <asp:ListItem Value="Single" Selected="True">Single</asp:ListItem>
				<asp:ListItem Value="Married">Married</asp:ListItem>
				</asp:radiobuttonlist>
			</td>
		</tr>
	    <tr><td colspan="2"></td></tr>
		
		<tr align="left">
		    <td style="padding-left:20px"><asp:label id="lbladdr" Runat="server" Text="Contact Details"></asp:label></td>
			<td>
			 <table>
			 <tr>
			    <td>
			        <asp:textbox id="txtaddr" Runat="server" TextMode="multiLine"></asp:textbox> &nbsp;
			    </td>
			    <td>
		        <asp:Image ID="imgcorrect4" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" />
			    <asp:Image ID="imgerror4" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" />
			    </td>
			    <td>
			    <asp:Label ID="usermsg4" runat="server" Font-Bold="False"  ForeColor="Red"></asp:Label>
			    </td>
			 </tr>   
			 </table>
			</td>
		 </tr>
		<tr><td colspan="2"></td></tr>
		<tr align="left">
		    <td></td>
			<td>
			 <table>
			 <tr>
			    <td>
			        <asp:textbox id="txtcity" Runat="server" Width="145px"></asp:textbox> &nbsp;
			     </td>
			     <td>
                <asp:Image ID="imgcorrect5" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" />
			    <asp:Image ID="imgerror5" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" />
			    </td>
			    <td>
			    <asp:Label ID="usermsg5" runat="server" Font-Bold="False"  ForeColor="Red"></asp:Label>	
			    </td>
			    
			     <td>
			        <asp:textbox id="txtstate" Runat="server" Width="145px"></asp:textbox>&nbsp;
			     </td>
			     <td>
                <asp:Image ID="imgcorrect6" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" />
			    <asp:Image ID="imgerror6" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" /> 
			    </td>
			    <td>
			        <asp:Label ID="usermsg6" runat="server" Font-Bold="False"  ForeColor="Red"></asp:Label>	
			    </td>
			    
			      <td>
			        <asp:textbox id="txtzipcode" Runat="server" Width="145px"></asp:textbox>&nbsp;
			     </td>
			     <td>
                <asp:Image ID="imgcorrect7" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" />
			    <asp:Image ID="imgerror7" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" />
			    </td>
			    <td>
			        <asp:Label ID="usermsg7" runat="server" Font-Bold="False"  ForeColor="Red"></asp:Label>	       
			    </td>
			 </tr>
			 </table>   
			 </td>
	    </tr>
			<%-- <cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" TargetControlID="txtaddr" WatermarkCssClass="wm" runat="server" WatermarkText="Address">
            </cc1:TextBoxWatermarkExtender>
            <cc1:TextBoxWatermarkExtender ID="twecity" TargetControlID="txtcity" WatermarkCssClass="wm" runat="server" WatermarkText="Town/City/Area">
            </cc1:TextBoxWatermarkExtender>
            <cc1:TextBoxWatermarkExtender ID="twstate" TargetControlID="txtstate" WatermarkCssClass="wm" runat="server" WatermarkText="Region/State">
            </cc1:TextBoxWatermarkExtender>
            <cc1:TextBoxWatermarkExtender ID="twzipcode" TargetControlID="txtzipcode" WatermarkCssClass="wm" runat="server" WatermarkText="Zip Code">
            </cc1:TextBoxWatermarkExtender>--%>
	  <%--  <tr>
		<td valign="middle" align="center" bgColor="#9cc7de" colspan="7" height="20">
		        <span class="style3"><strong>
		        <font color="#000099"><font face="Arial, Helvetica, sans-serif" color="#006699">
		        Please ensure that you provide email address and contact number</font></font></strong></span>
		    </td>
		</tr>--%>
		<tr>
		    <td style="padding-left:20px"><asp:label id="lblemail" Runat="server" Text="email ID"></asp:label></td>
			<td>
			    <table>
			        <tr>
			        <td>
			            <asp:textbox id="txtemail" Runat="server"></asp:textbox>&nbsp;
			        </td>
			        <td>
    			<asp:Image ID="imgcorrect8" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" />
	    		<asp:Image ID="imgerror8" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" />
	    		    </td>    
	    		    <td>    
	    		<asp:Label ID="usermsg8" runat="server" Font-Bold="False"  ForeColor="Red"></asp:Label>
	    		    </td>
	    		</tr>
			    </table>
		     </td>
		</tr>
		<tr>
		    <td style="padding-left:20px"><asp:label id="lblphno" Runat="server" Text="Contact No."></asp:label></td>
			<td>
			<table>
			    <tr>
			        <td>
			            <asp:TextBox ID="txtcountrycode" Runat="server" Width="40px"></asp:TextBox>
                            -
				            <asp:TextBox ID="txtstdcode" Runat="server" Width="40px"></asp:TextBox>
                            -
				            <asp:textbox id="txtphno" Runat="server"></asp:textbox>        
			        </td>
			    </tr>
			</table>
			
                <!--  (Country Code - STD Code - Contact Number) -->
			<%--	 <cc1:TextBoxWatermarkExtender ID="twstdcode" TargetControlID="txtstdcode" WatermarkCssClass="wm" runat="server" WatermarkText="STD">
            </cc1:TextBoxWatermarkExtender>
             <cc1:TextBoxWatermarkExtender ID="twphno" TargetControlID="txtphno" WatermarkCssClass="wm" runat="server" WatermarkText="Phone">
            </cc1:TextBoxWatermarkExtender>--%>
            
			</td>
		</tr>
		<tr>
		    <td style="padding-left:20px"><asp:label id="Label1" Runat="server" Text="Mobile No."></asp:label></td>
			<td colspan="3">
			    <table>
			        <tr>
			            <td>
			                <asp:TextBox ID="txtccode" Runat="server" Width="40px"></asp:TextBox>
                            -
				            <asp:TextBox ID="txtmobileno" Runat="server"></asp:TextBox>        
			            </td>
			            <td>
			    <asp:Image ID="imgcorrect9" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" />
			    <asp:Image ID="imgerror9" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" />        		            </td>
		                <td>
		                    <asp:Label ID="usermsg9" runat="server" Font-Bold="False"  ForeColor="Red"></asp:Label>        
		                </td>	    
			        </tr>
			    </table>
			     <cc1:TextBoxWatermarkExtender ID="twmobile" TargetControlID="txtmobileno" WatermarkCssClass="wm" runat="server" WatermarkText="Mobile No.">
            </cc1:TextBoxWatermarkExtender>
			</td>
		</tr>
		<tr>
		    <td style="padding-left:20px"><asp:label id="lbldob" Runat="server" Text="Date Of Birth"></asp:label></td>
			<td>
			    <table>
			    <tr>
			        <td>
			            <asp:TextBox ID="txtdob" runat="server" CssClass="DatePicker"></asp:TextBox>&nbsp;
<!--			            <a id="dt3" href="javascript:NewCal('txtdob','MMddyyyy',false,24)" runat="server">
			            <img id="IMG2" height="16" alt="Pick a date" src="etgsimages/cal.gif" width="16" border="0" runat="server"></a>-->
		        </td>	    
		        <td>
			    <asp:Image ID="imgcorrect10" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" />
        		<asp:Image ID="imgerror10" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" />
        		</td>
        		<td>
		            <asp:Label ID="usermsg10" runat="server" Font-Bold="False"  ForeColor="Red"></asp:Label>
		        </td>
			    </tr>
			    </table>
			 </td>
		</tr>
		<tr>
		    <td style="padding-left:20px"><asp:label id="lblnationality" Runat="server" Text="Nationality"></asp:label></td>
			<td>
			<table>
			<tr>
			    <td>
			        <asp:textbox id="txtnationality" Runat="server"></asp:textbox>&nbsp;
			    </td>
			    <td>
                 <asp:Image ID="imgcorrect11" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" />
			     <asp:Image ID="imgerror11" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" />
	             </td>    
	             <td>
        		 <asp:Label ID="usermsg11" runat="server" Font-Bold="False"  ForeColor="Red"></asp:Label>
                </td>
            </tr>
			</table>
			 </td>
		</tr>	 
		<tr>
		    <td style="padding-left:20px"><asp:label id="lblpassport" Runat="server" Text="Passport Number"></asp:label></td>
			<td>
			<table>
			    <tr>
			        <td>
			            <asp:textbox id="txtpassport" Runat="server"></asp:textbox>
			        </td>
			    </tr>
			</table>
        	</td>        		
		</tr>
		<tr>
		    <td style="padding-left:20px"><asp:label id="lblvisa" Runat="server" Text="Do you have a student visa? "></asp:label></td>
			<td>
			<table>
			    <tr>
			    <td>
			    
			<asp:radiobuttonlist id="rblvisa" Runat="server" Width="255px" RepeatDirection="Horizontal" Height="34px">
			        <asp:ListItem Value="Yes" Selected="True">Yes</asp:ListItem>
			        <asp:ListItem Value="No">No</asp:ListItem>
			        <asp:ListItem Value="Do not need a visa">Do not need a visa</asp:ListItem>
			    </asp:radiobuttonlist>
			    </td>
			        </tr>
			    </table>
			</td>
		</tr>
		</table>
    </fieldset>
    <br /><br />
	<fieldset>
	    <legend>&nbsp;
        <span class="style3"><strong>
		        <font color="#000099"><font face="Arial, Helvetica, sans-serif" color="#006699">
		        Who is responsible for payment of your course fees?(if you are paying the fees 											        yourself please enter your name and write 'as above' in the other fields for 											        this section)</font></font></strong></span>
        &nbsp;</legend>
		<table>
		<%--<tr align="left">
		    <td valign="middle" align="center" bgColor="#9cc7de" colspan="7" height="20">
		        <span class="style3"><strong>
		        <font color="#000099"><font face="Arial, Helvetica, sans-serif" color="#006699">
		        Who is responsible for payment of your course fees?(if you are paying the fees 											        yourself please enter your name and write 'as above' in the other fields for 											        this section)</font></font></strong></span>
		    </td>
		</tr>--%>
		<tr>
		    <td style="padding-left:20px"><asp:label id="lblname1" Runat="server" text="Name"></asp:label></td>
			<td>
			<table>
			    <tr>
			        <td>
            			<asp:textbox id="txtPName" Runat="server"></asp:textbox>&nbsp;
            	    </td>
            	    <td>
			    <asp:Image ID="imgcorrect12" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" />
			    <asp:Image ID="imgerror12" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" />
			    </td>
			    <td>
		        <asp:Label ID="usermsg12" runat="server" Font-Bold="False"  ForeColor="Red"></asp:Label>
		        </td>
			    </tr>
			</table>
			</td>
		</tr>
		<tr>
		    <td style="padding-left:20px" ><asp:label id="lblPAddr" Runat="server" text="Address"></asp:label></td>
			<td>
			<table>
			    <tr>
			        <td>
			            <asp:textbox id="txtPAddr" Runat="server" TextMode="MultiLine"></asp:textbox>&nbsp;
			        </td>
			        <td>
			    <asp:Image ID="imgcorrect13" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" />
			    <asp:Image ID="imgerror13" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" />
                    </td>
                    <td>
                        <asp:Label ID="usermsg13" runat="server" Font-Bold="False"  ForeColor="Red"></asp:Label>
                    </td>
                </tr>
               </table>
               </td>
		</tr>
		<tr>
		    <td style="height: 24px;padding-left:20px">
		        <asp:label id="lblPRel" Runat="server" Width="120px" text="Relationship to applicant"></asp:label></td>
			<td>
			<table>
			    <tr>
			        <td>
            			<asp:textbox id="txtPRelationship" Runat="server"></asp:textbox>&nbsp;
            		</td>
            		<td>    	
			    <asp:Image ID="imgcorrect14" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" />
			    <asp:Image ID="imgerror14" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" />
			        </td>
			        <td>
			    <asp:Label ID="usermsg14" runat="server" Font-Bold="False"  ForeColor="Red"></asp:Label>
			    </td>
			    </tr>
			</table>
        	</td>
		</tr>
		<tr>
		    <td style="padding-left:20px">
		        <asp:label id="lblPOcc" Runat="server" Width="112px" text="Occupation of Sponsor"></asp:label></td>
			<td>
			<table><tr><td>
			<asp:textbox id="txtPOccupation" Runat="server"></asp:textbox>&nbsp;
			</td>
			<td>
			    <asp:Image ID="imgcorrect15" runat="server"  style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/correct.gif" />
			    <asp:Image ID="imgerror15" runat="server" style="display:none" ImageUrl="~/EtgsImages/OnlineImgs/erroricon1.gif" />
			</td>
			<td>
		        <asp:Label ID="usermsg15" runat="server" Font-Bold="False"  ForeColor="Red"></asp:Label>
		    </td></tr></table>    
			</td>
		</tr>
		<tr>
		    <td align="center" colspan="2"><br />
		        <asp:button id="btnSTDsubmit" Runat="server" Text="Next >>" OnClick="btnSTDsubmit_Click"></asp:button>
		        &nbsp;&nbsp;&nbsp;
			    <asp:button id="btnreset" Runat="server" Text="Reset" OnClick="btnreset_Click"></asp:button>
			</td>
		</tr>
		<tr>
		</tr>
	</table>
	</fieldset>
</asp:Panel>

<asp:Panel ID="PanelCourseDetails" runat="server" Width="91%" style="padding-left:30px">
 <fieldset>
        <legend>&nbsp;
        <span class="style3"><strong>
		        <font color="#000099"><font face="Arial, Helvetica, sans-serif" color="#006699">
		         Please provide your Course details:(Please note:some of our courses can not be applied 
		        for online and are not displayed here)</font></font></strong></span>
        &nbsp;</legend>
    <table border="0" Width="100%">
      <%--  <tr valign="top" bgColor="#cccccc">
		</tr>
		<tr align="left">
		    <td valign="middle" align="center" bgColor="#9cc7de" colspan="7" height="20">
		        <span class="style3"><strong>
		        <font color="#000099"><font face="Arial, Helvetica, sans-serif" color="#006699">
		        Please provide your Course details:(Please note:some of our courses can not be applied 
		        for online and are not displayed here)</font></font></strong></span>
		    </td>
		</tr>--%>
		
		<tr><td><br /></td></tr>
		<tr>
		    <td valign="top" align="right" style="padding-left:20px">
			    <div align="left"><font class="moki" face="Arial, Helvetica, sans-serif">Offered Courses</font></div>
            </td>
			<td height="13" style="padding-left:5px"><asp:dropdownlist id="ddlcsoffered" tabIndex="1" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlcsoffered_SelectedIndexChanged"></asp:dropdownlist>
			</td>
		</tr>
	<tr>
		    <td valign="top" align="right" style="padding-left:20px" rowspan="2">
			    <div align="left"><font class="moki" id="FONT1" face="Arial, Helvetica, sans-serif" runat="server">
			        Course name and start Date </font>
				</div>
			</td>
		    <td height="7" style="padding-left:5px"><label>
			    <div align="left"><asp:dropdownlist id="ddlRcourses" tabIndex="2" Runat="server" Width="400px"></asp:dropdownlist></div>
			</label></td>
		</tr>
		<tr>
		    <td style="padding-left:5px"><label>
			    <div align="left"><asp:dropdownlist id="ddldates" tabIndex="3" Runat="server"></asp:dropdownlist></div>
				</label></td>
		</tr>
		<tr><td><br /></td></tr>
		<tr>
		    <td valign="top" align="right" style="height:13;padding-left:20px">
			    <div align="left"><font class="moki" face="Arial, Helvetica, sans-serif">Other Course</font></div>
            </td>
			<td height="13" style="padding-left:5px"><asp:dropdownlist id="ddlspecialcourses" tabIndex="4" Runat="server"></asp:dropdownlist>
			</td>
		</tr>
		</table>
</fieldset>
		<fieldset>
        <legend>&nbsp;
        <span class="style3"><strong>
		        <font color="#000099"><font face="Arial, Helvetica, sans-serif" color="#006699">
		         Please provide details of your previous education and work experience</font></font></strong></span>
        &nbsp;</legend>
		<table>
		<tr><td style="width: 260px"><br /></td></tr>
		<%--<tr align="left">
		    <td valign="middle" align="center" bgColor="#9cc7de" colspan="7" height="20">
		        <span class="style3"><strong>
		        <font color="#000099"><font face="Arial, Helvetica, sans-serif" color="#006699">
		        Please provide details of your previous education and work experience</font></font></strong></span>
		    </td>
		</tr>--%>
        <tr><td colspan="2"><br /></td></tr>
		<tr>
		    <td valign="top" align="right" style="padding-left:20px; width: 260px;">
			    <div align="left"><font class="moki" face="Arial, Helvetica, sans-serif">
			    Examinations taken with dates (we may ask proof of these if they are required for acceptance 
                on a course)</font></div>
			</td>
		    <td style="padding-left:5px"><label><div align="left">
			<asp:textbox id="txtexamdetails" tabIndex="5" Runat="server" Rows="4" TextMode="MultiLine" Columns="60"></asp:textbox>             </div>
			</label></td>
		</tr>
		<tr>
		    <td valign="top" align="right" style="padding-left:20px; width: 260px;">
			    <div align="left"><font class="moki" face="Arial, Helvetica, sans-serif">IELTS/TOEFL Score </font></div>
            </td>
			<td style="padding-left:5px"><label>
			<div align="left"><asp:textbox id="txtietls_score" tabIndex="6" Runat="server"></asp:textbox></div>
			</label></td>
		</tr>
		<tr>
		    <td vAlign="top" align="center" style="padding-left:20px; width: 260px;">
			<div align="left"><font class="moki" face="Arial, Helvetica, sans-serif">Attach Documents Card </font></div>
            </td>
			<td style="padding-left:5px">
			    <table>
			        <tr>
					    <td colspan="2"><font bold="true" color="red">*</font>
					    <asp:label id="lblacedmic" Runat="server" text=" Certified copies of your acedemic qualifications"></asp:label>                     </td>
					    <td>
					        <div align="left"><INPUT class="moki" id="File1" type="file" runat="server" tabindex="7" /></div>
                        </td>
			        </tr>
					<tr>
					    <td colspan="2" style="height: 20px"><font bold="true" color="red">*</font>
					        <asp:label id="Label2" Runat="server" text=" A copy of your passport, visa or birth certificate"></asp:label></td>
						<td style="height: 20px">
						    <div align="left"><input class="moki" id="File2" type="file" runat="server" tabindex="8" /></div>
                        </td>
					</tr>
					 <tr>
					    <td colspan="2"><font bold="true"></font>
					        <asp:label id="lblscorecard" Runat="server" text="IELTS/TOFEL Score Card"></asp:label>
					    </td>
                        <td>
						    <div align="left"><input class="moki" id="File3" type="file" runat="server" tabindex="9" /></div>
                        </td>
					</tr>
					<tr>
					    <td colspan="2"><font bold="true"></font>
					    <asp:label id="lblemployment" Runat="server" text="Any relevant employment documentation"></asp:label></td>
						<td>
						<div align="left"><input class="moki" id="File4" type="file" runat="server" tabindex="10" />
						</div>
						</td>
					</tr>
					<tr>
						<td colspan="3" align="right"><br />
						<asp:HiddenField ID="hidAQ" runat="server" /> 
						<asp:HiddenField ID="hidBC" runat="server" />
						<asp:HiddenField ID="hidDirName" runat="server" />
						<asp:button id="btnAttestFiles" Runat="server" Text="Attest Files" ForeColor="red" Font-Bold="true" OnClick="btnAttestFiles_Click" tabindex="11"></asp:button>
						</td>
					</tr>
					<tr>
						<td align="center" colspan="3">
						<asp:label id="lblAttestedFiles" Runat="server" Font-Bold="True"></asp:label></td>
					</tr>
					<tr>
						<td colspan="3"></td>
					</tr>
					<tr>
						<td align="center" colSpan="3"></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
		    <td valign="top" align="right" style="padding-left:20px; width: 260px;">
			    <div align="left"><font class="moki" face="Arial, Helvetica, sans-serif">Work Experience </font></div>
            </td>
			<td style="padding-left:5px"><label>
				<div align="left"><asp:textbox id="txtworkexp" tabIndex="12" Runat="server" Rows="4" TextMode="MultiLine" Columns="60"></asp:textbox></div></label>
			</td>
        </tr>
        
	    <%--	<tr>
		    <font face="Arial, Helvetica, sans-serif"></font>
		    <td valign="top" align="right">
			<div align="left"><font class="moki" face="Arial, Helvetica, sans-serif">Why have you choosen EThames and this                         particular course?</font></div>
			</td>
			<td><label>
			    <div align="left">
			    <asp:textbox id="txtwhyethames" tabIndex="5" Runat="server" Rows="6" TextMode="MultiLine" Columns="60"></asp:textbox></div>
				</label></td>
		</tr>--%>
		<tr>
		    <td vAlign="top" align="right" style="width: 260px">
		    <div align="left"><font class="moki" face="Arial, Helvetica, sans-serif">Please advise us of any 
			special support or facilities that you may require because of disabilities or 
			other conditions that you may have e.g. mobility issues, health issues, etc. </font>
			</div>
			</td>
			<td style="padding-left:5px"><label><asp:textbox id="txtspecialneeds" tabIndex="13" Runat="server" Rows="4" TextMode="MultiLine" Columns="60"></asp:textbox>
            </label></td>
		</tr>
		
        <%--<tr>
		    <td><asp:label id="lblcv" Runat="server">Cirruculum Vitae</asp:label></td>
			<td><input class="moki" id="File6" type="file" runat="server">    
            <asp:button id="btnAttestCV" Runat="server" Text="Attest CV" ForeColor="red" Font-Bold="true"></asp:button>  
			<asp:label id="lblAttestCV" Runat="server" Font-Bold="True" text="CV Attesed"></asp:label>
			</td>
		</tr>--%>
		<tr>
		    <td align="center" colspan="2" style="height: 19px"><br />
		    <asp:button id="btnCSBack" Runat="server" Text="Back" OnClick="btnCSBack_Click" TabIndex="14"></asp:button> 
		    &nbsp;&nbsp;
            <asp:button id="btnCSnext" Runat="server" Text="Next>>" OnClick="btnCSnext_Click" TabIndex="15"></asp:button>
            &nbsp;&nbsp;
            <asp:button id="btnCShome" Runat="server" Text="Home" OnClick="btnCShome_Click" TabIndex="16"></asp:button></td>
		</tr>
	</table>
</fieldset>
</asp:Panel>

<asp:Panel ID="PanelAgreement" runat="server" Width="91%" style="padding-left:30px;padding-top:50px">
   <%-- <table width="100%">
        <tr align="left">
		    <td valign="middle" align="center" bgColor="#9cc7de" colspan="7" style="height: 20px">
		        <span class="style3"><strong>
		        <font color="#000099"><font face="Arial, Helvetica, sans-serif" color="#006699">
		        Application Process for Overseas Students</font></font></strong></span>
		    </td>
		</tr>
	</table>--%>
	<fieldset>
	    <legend>
	            <span class="style3"><strong>
		        <font color="#000099"><font face="Arial, Helvetica, sans-serif" color="#006699">
		        Application Process for Overseas Students</font></font></strong></span>
	    </legend>
	
	<table width="100%">
	    <tr>
		    <font face="Arial, Helvetica, sans-serif"></font>
			<td class="apply_online" height="85" align="center">
			At the time of processing Applications, we receive spurious requests and false information that makes the entire process time-consuming and delayed. We request you to provide us with correct, authentic information by agreeing to provide us with the correct details about yourself. This will help us in making Application Processing fast and efficient.<br /><br />
		    <font face="Arial, Helvetica, sans-serif">“I declare that the information that I have provided is correct and accurate to the best of my knowledge, at the time of filling this application.”</font>
            </td>
	    </tr>
	    <tr>
		    <td></td>
		</tr>
		<tr>
		    <td align="center"><asp:radiobutton id="rbagree" AutoPostBack="True" Runat="server" Text="I Agree" OnCheckedChanged="rbagree_CheckedChanged"></asp:radiobutton></td>     </tr>
		<tr>
		    <td><br /></td>
		</tr>
		<tr align="center">
		    <td>
		        <asp:button id="btnAgmtBack" Runat="server" Text="Back" OnClick="btnAgmtBack_Click"></asp:button>
			    <asp:button id="btnAgrred" Runat="server" Text="Finish" OnClick="btnFinish_Click"></asp:button> 
				<asp:button id="btnAgmthome" Runat="server" Text="Home" OnClick="btnAgmthome_Click"></asp:button></td>
		</tr>
        <tr>
		</tr>
		<tr>
		    <td align="center"><asp:label id="lblAgmtMsg" Runat="server" ForeColor="DarkGreen" Font-Bold="True" Font-Size="10pt"></asp:label></td>
		</tr>
		<tr><td><br /><br /></td></tr>
	</table>
	</fieldset>
</asp:Panel>

    </div>

    </form>
    
</body>

Oh man... that's so confusing.

hi,
u asked where to call the function,in asp.net we call the function in server side.The function call for the above method is

protected void Page_Load(object sender, EventArgs e)
    {
        btnSTDsubmit.Attributes.Add("onclick", "javascript:return ValidateForm()");
        btnCSnext.Attributes.Add("onclick", "javascript:return ValidateCS()");

        txtstdcode.Attributes.Add("onkeypress", "javascript:return numvalues()");
        txtphno.Attributes.Add("onkeypress", "javascript:return numvalues()");
        txtmobileno.Attributes.Add("onkeypress", "javascript:return numvalues()");
        txtietls_score.Attributes.Add("onkeypress", "javascript:return numvalues()");
        
        btnSTDsubmit.Attributes.Add("onclick", "javascript:return validateform();");
        ddltitle.Attributes.Add("onblur", "javascript:return v_title('ddltitle');");
        txtfirstname.Attributes.Add("onblur", "javascript:return v_firstname('txtfirstname');");
        txtfamilyname.Attributes.Add("onblur", "javascript:return v_familyname('txtfamilyname');");
        txtaddr.Attributes.Add("onblur", "javascript:return v_address('txtaddr');");
        txtcity.Attributes.Add("onblur", "javascript:return v_city('txtcity');");
        txtstate.Attributes.Add("onblur", "javascript:return v_state('txtstate');");
        txtzipcode.Attributes.Add("onblur", "javascript:return v_zipcode('txtzipcode');");
        txtemail.Attributes.Add("onblur", "javascript:return v_email('txtemail');");
        txtdob.Attributes.Add("onblur", "javascript:v_dob('txtdob');");
        txtnationality.Attributes.Add("onblur", "javascript:return v_nationality('txtnationality');");

        txtPName.Attributes.Add("onblur", "javascript:return v_pname('txtPName');");
        txtPAddr.Attributes.Add("onblur", "javascript:return v_paddress('txtPAddr');");
        txtPRelationship.Attributes.Add("onblur", "javascript:return v_prelation('txtPRelationship');");
        txtPOccupation.Attributes.Add("onblur", "javascript:return v_poccupation('txtPOccupation');");

        //txtstdcode.Attributes.Add("onblur", "javascript:return numvalues()");
        //txtphno.Attributes.Add("onblur", "javascript:return numvalues()");
        //txtmobileno.Attributes.Add("onblur", "javascript:return numvalues()");
        //txtietls_score.Attributes.Add("onblur", "javascript:return numvalues()");

        //txtemail.Attributes.Add("onblur", "javascript:return ChkEmailID()");

        if (!IsPostBack)
        {
            #region "Panel Visible True or False"
            PanelStudentDetails.Visible = true;
            PanelCourseDetails.Visible = false;
            PanelAgreement.Visible = false;
            #endregion
            usermsg1.Style.Add("visibility", "hidden");
            usermsg2.Style.Add("visibility", "hidden");
            usermsg3.Style.Add("visibility", "hidden");
            usermsg4.Style.Add("visibility", "hidden");
            usermsg5.Style.Add("visibility", "hidden");
            usermsg6.Style.Add("visibility", "hidden");
            usermsg7.Style.Add("visibility", "hidden");
            usermsg8.Style.Add("visibility", "hidden");
            usermsg9.Style.Add("visibility", "hidden");
            usermsg10.Style.Add("visibility", "hidden");
            usermsg11.Style.Add("visibility", "hidden");
            usermsg12.Style.Add("visibility", "hidden");
            usermsg13.Style.Add("visibility", "hidden");
            usermsg14.Style.Add("visibility", "hidden");
            usermsg15.Style.Add("visibility", "hidden");

            btnAgrred.Enabled = false;
            BindCountries();
            //BindRegularCourses();
            BindOfferedCourses();
            BindSpecialCourses();
            BindCourseDates();
        }
    }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.