Geeks With Blogs
Gaurav Taneja Great dreams... never even get out of the box. It takes an uncommon amount of guts to put your dreams on the line, to hold them up and say, "How good or how bad am I?" That's where courage comes in.
<script type="text/javascript">
    var hdnPopUp=document.getElementById('<%=hdnOpenPopup.ClientID %>');
   
    if(hdnPopUp.value!='')
    {  
        var PopupUrl='../Common/SelectDetails.aspx?ModuleName='+hdnPopUp.value;       
        window.open(PopupUrl,null,'height=700px,width=560px,left=180px,scrollbar=yes,resizable=0,menubar=0,status=0');
     }
    var frmvalidator  = new Validator('aspnetForm','<%=btnSave.ClientID%>','','','<%=lblError.ClientID%>');
    frmvalidator.addValidation('<%=txtLoginName.ClientID%>','<%=AdminConstantKeys.Required%>','<%=CommonFunction.GetErrorMessage("ERR4712").Replace(AdminConstantKeys.TildeCharacter, AdminConstantKeys.LoginNamePM)%>');
    frmvalidator.addValidation('<%=txtArtistName.ClientID%>','<%=AdminConstantKeys.Required%>','<%=CommonFunction.GetErrorMessage("ERR4700").Replace(AdminConstantKeys.TildeCharacter, AdminConstantKeys.ArtistNamePM)%>');
    frmvalidator.addValidation('<%=txtEmailID.ClientID%>','<%=AdminConstantKeys.Required%>','<%=CommonFunction.GetErrorMessage("ERR4701").Replace(AdminConstantKeys.TildeCharacter, AdminConstantKeys.EmailPM)%>');
    frmvalidator.addValidation('<%=txtEmailID.ClientID%>','<%=AdminConstantKeys.strValidEmail%>','<%=CommonFunction.GetErrorMessage("ERR4741").Replace(AdminConstantKeys.TildeCharacter, AdminConstantKeys.EmailPM)%>');
    frmvalidator.addValidation('<%=txtAddress1.ClientID%>','<%=AdminConstantKeys.Required%>','<%=CommonFunction.GetErrorMessage("ERR4703").Replace(AdminConstantKeys.TildeCharacter, AdminConstantKeys.Address1PM)%>');   
    frmvalidator.addValidation('<%=txtCity.ClientID%>','<%=AdminConstantKeys.Required%>','<%=CommonFunction.GetErrorMessage("ERR4704").Replace(AdminConstantKeys.TildeCharacter, AdminConstantKeys.CityPM)%>');
    frmvalidator.addValidation('<%=ddlCountry.ClientID%>','<%=AdminConstantKeys.DontSelect%>','<%=CommonFunction.GetErrorMessage("ERR4707").Replace(AdminConstantKeys.TildeCharacter, AdminConstantKeys.CountryPM)%>');
    frmvalidator.addValidation('<%=ddlState.ClientID%>','<%=AdminConstantKeys.DontSelect%>','<%=CommonFunction.GetErrorMessage("ERR4705").Replace(AdminConstantKeys.TildeCharacter, AdminConstantKeys.StatePM)%>');
    <%
       
        if(ddlState.SelectedItem.Text.Equals("Other"))
        {
    %>
      frmvalidator.addValidation('<%=txtOtherState.ClientID%>','<%=AdminConstantKeys.Required%>','<%=CommonFunction.GetErrorMessage("ERR4711").Replace(AdminConstantKeys.TildeCharacter, AdminConstantKeys.CityPM)%>');
    <%} %>
    frmvalidator.addValidation('<%=txtZip.ClientID%>','<%=AdminConstantKeys.Required%>','<%=CommonFunction.GetErrorMessage("ERR4706").Replace(AdminConstantKeys.TildeCharacter, AdminConstantKeys.ZipPM)%>');
    frmvalidator.addValidation('<%=txtZip.ClientID%>','<%=AdminConstantKeys.EditArtistAlphanumeric%>','<%=CommonFunction.GetErrorMessage("ERR4733").Replace(AdminConstantKeys.TildeCharacter, AdminConstantKeys.ZipPM)%>');
    frmvalidator.addValidation('<%=ddlGenre.ClientID%>','<%=AdminConstantKeys.DontSelect%>','<%=CommonFunction.GetErrorMessage("ERR4708").Replace(AdminConstantKeys.TildeCharacter, AdminConstantKeys.GenrePM)%>');
    frmvalidator.addValidation('<%=ddlSignRec.ClientID%>','<%=AdminConstantKeys.DontSelect%>','<%=CommonFunction.GetErrorMessage("ERR4709").Replace(AdminConstantKeys.TildeCharacter, AdminConstantKeys.SignedForRecordCompanyPM)%>');
    frmvalidator.addValidation('<%=ddlProfRep.ClientID%>','<%=AdminConstantKeys.DontSelect%>','<%=CommonFunction.GetErrorMessage("ERR4710").Replace(AdminConstantKeys.TildeCharacter, AdminConstantKeys.ProfessionalRepresentationPM)%>');
     frmvalidator.addValidation('<%=lstInfluences.ClientID%>','<%=AdminConstantKeys.Required%>','<%=CommonFunction.GetErrorMessage("ERR4732").Replace(AdminConstantKeys.TildeCharacter, AdminConstantKeys.ArtistInf)%>');

    </script> Posted on Thursday, March 6, 2008 4:43 AM Validation | Back to top


Comments on this post: How to Use the javascript file in the aspx file.?

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Gaurav Taneja | Powered by: GeeksWithBlogs.net