Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- saved from url=(0022)http://internet.e-mail -->
- @inherits PortableRazor.ViewBase
- @using PortableRazor
- @model QuestionModel
- <!DOCTYPE HTML>
- <html lang="en-US">
- <head>
- <meta charset="utf-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- @*<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, height=device-height" />*@
- <meta name="viewport" content="width=device-width, initial-scale=2, maximum-scale=1, user-scalable=0" />
- <title>Tata AIA</title>
- <link rel="stylesheet" type="text/css" href="css/style.css">
- <link rel="stylesheet" type="text/css" href="css/font-awesome.css">
- <script src="jquery-1.11.3.min.js"></script>
- <script type="text/javascript">
- var Que1Final = "Empty";
- var Que1Ans = "Empty";
- var Que1AnsOther = "Empty";
- var Que2AnsAddress = "Empty";
- var Que3AnsPinCode = "Empty";
- var Que4AnsAnnualIncome = "Empty";
- var Que5Ans = "Empty";
- var Que5Ans_SSC = "Empty";
- var Que5Ans_HSC = "Empty";
- var Que5Ans_Graduate = "Empty";
- var Que5Ans_Diploma = "Empty";
- var Que5Ans_Other = "Empty";
- var Que5Ans_Education_Other = "Empty";
- var Que6AnsNatureofOccupationandDuties = "Empty";
- var message = "";
- $(document).ready(function () { // document.getElementById("Check2").checked = true; // Que1Ans = "No";
- Que1AnsOther = "Empty";
- var textarea = $('textArea');
- textarea.hide();
- $("#txt_Others").focus(function () {
- $('#mainDiv').css({ marginTop: '-=360px' });
- });
- $('#txt_Others').on('blur', function () {
- $('#mainDiv').css({ marginTop: '+=360px' });
- });
- $("#NatureOfOccupationAndDuties").focus(function () {
- $('#mainDiv').css({ marginTop: '-=360px' });
- });
- $('#NatureOfOccupationAndDuties').on('blur', function () {
- $('#mainDiv').css({ marginTop: '+=360px' });
- });
- /* ------ Shift input on keboard Open ------ */
- });
- function validation() {
- //Que1
- var Q1CheckYes = document.getElementById("Check1");
- var Q1CheckNo = document.getElementById("Check2");
- var str_Q1Ans_diseaseValue = document.getElementById("textArea").value;
- var str_town = document.getElementById("txt_town").value;
- var str_pin = document.getElementById("pincode").value;
- var town = str_town.length;
- var pincode = str_pin.length;
- var str_annualincome = document.getElementById("annualincome").value;
- var chk_SSC = document.getElementById("chk1");
- var chk_HSC = document.getElementById("chk2");
- var chk_Graduate = document.getElementById("chk3");
- var chk_Diploma = document.getElementById("chk4");
- var str_txt_Others = document.getElementById("txt_Others").value;
- var str_nature = document.getElementById("NatureOfOccupationAndDuties").value;
- Que1Final = "Empty";
- //Que1
- if (Q1CheckYes.checked) {
- Que1Ans = "Yes";
- Que1AnsOther = "Empty";
- if (str_Q1Ans_diseaseValue.length != 0) {
- Que1AnsOther = str_Q1Ans_diseaseValue;
- Que1Final = "NotEmpty";
- }
- else {
- message = message + "\n Other disease field can not Empty";
- Que1AnsOther = "Empty";
- Que1Final = "Empty";
- }
- }
- else {
- Que1AnsOther = "Empty";
- }
- if (Q1CheckNo.checked) {
- Que1Ans = "No";
- Que1AnsOther = "Empty";
- Que1Final = "NotEmpty";
- }
- if (!Q1CheckYes.checked && !Q1CheckNo.checked) {
- Que1Final = "Empty"; message = message + "\n Are you suffering from any heart disease";
- }
- //Que2 Address
- if (town == 0) {
- Que2AnsAddress = "Empty";
- message = message + "\n Address field can not Empty";
- }
- else if (town > 100) {
- Que2AnsAddress = "Empty";
- message = message + "\n Address field can not be more than 100 characters";
- }
- else {
- Que2AnsAddress = str_town;
- }
- //Que3 pincode
- if (str_pin == "" || isNaN(str_pin) || str_pin.length != 6) {
- Que3AnsPinCode = "Empty";
- message = message + "\n Please provide a Pincode in the format ######";
- }
- else {
- Que3AnsPinCode = str_pin;
- }
- //Que4 AnnualIncome
- if (!/^[0-9]+$/.test(str_annualincome)) {
- Que4AnsAnnualIncome = "Empty";
- message = message + "\n Please enter valid Annual Income";
- }
- else {
- Que4AnsAnnualIncome = str_annualincome;
- }
- //Que5 HighestEducation
- if (chk_SSC.checked || chk_HSC.checked || chk_Graduate.checked || chk4.checked || str_txt_Others.length != 0) {
- Que5Ans = "NotEmpty";
- Que5Ans_SSC = "Empty";
- Que5Ans_HSC = "Empty";
- Que5Ans_Graduate = "Empty";
- Que5Ans_Diploma = "Empty";
- Que5Ans_Other = "Empty";
- Que5Ans_Education_Other = "Empty";
- if (chk_SSC.checked) {
- Que5Ans_SSC = chk_SSC.value;
- }
- if (chk_HSC.checked) {
- Que5Ans_HSC = chk_HSC.value;
- }
- if (chk_Graduate.checked) {
- Que5Ans_Graduate = chk_Graduate.value;
- }
- if (chk_Diploma.checked) {
- Que5Ans_Diploma = chk_Diploma.value;
- }
- if (str_txt_Others.length != 0) {
- Que5Ans_Other = str_txt_Others;
- }
- }
- else {
- Que5Ans = "Empty";
- Que5Ans_SSC = "Empty";
- Que5Ans_HSC = "Empty";
- Que5Ans_Graduate = "Empty";
- Que5Ans_Diploma = "Empty";
- Que5Ans_Other = "Empty";
- Que5Ans_Education_Other = "Empty";
- message = message + "\n Please confirm highest education";
- }
- //Que6 NatureOfOccupationAndDuties
- if (str_nature.length == 0) {
- Que6AnsNatureofOccupationandDuties = "Empty";
- message = message + "\n Please provide Nature Of Occupation And Duties";
- }
- else {
- Que6AnsNatureofOccupationandDuties = str_nature;
- }
- if (Que1Final != "Empty" && Que2AnsAddress != "Empty" && Que3AnsPinCode != "Empty" && Que4AnsAnnualIncome != "Empty" && Que6AnsNatureofOccupationandDuties != "Empty" && Que5Ans != "Empty") {
- location.href = '@Url.Action("btnagree", "QuestionController")?Anwer=' + Que1Ans + "##" + Que1AnsOther + "##" + Que2AnsAddress + "||" + Que3AnsPinCode + "##" + Que4AnsAnnualIncome + "##" + Que5Ans_SSC + "||" + Que5Ans_HSC + "||" + Que5Ans_Graduate + "||" + Que5Ans_Diploma + "||" + Que5Ans_Other + "##" + Que6AnsNatureofOccupationandDuties;
- }
- else {
- alert(message)
- message = "";
- }
- //alert(Que1Ans + " "+Que1AnsOther + " " + Que2AnsAddress + " " + Que3AnsPinCode + " " + Que4AnsAnnualIncome + " " + Que5Ans_SSC + " " + Que5Ans_HSC + " " + Que5Ans_Graduate + " " + Que5Ans_Diploma+" "+Que5Ans_Other+" "+Que5Ans_Education_Other+" "+Que6AnsNatureofOccupationandDuties)
- // location.href = '@Url.Action("btnagree", "QuestionController")?Anwer=' + textarea.value + "||" + str_town + "||" + annualincome + "||" + chk_SSC + "||" + chk_HSC + "||" + chk_Graduate + "||" + chk_Diploma + "||" + txt_Others + "||" + str_pin;
- } function limitText(limitField, limitNum) {
- if (limitField.value.length > limitNum) { limitField.value = limitField.value.substring(0, limitNum); }
- }
- function selectEducation(id) {
- //alert("Education box check")
- for (var i = 1; i <= 4; i++) {
- document.getElementById("chk" + i).checked = false;
- }
- document.getElementById(id).checked = true;
- }
- function selectOnlyThis(id) {
- var textarea = $('textArea');
- for (var i = 1; i <= 2; i++) {
- document.getElementById("Check" + i).checked = false;
- }
- document.getElementById(id).checked = true;
- var value = document.getElementById(id).value;
- if (value == "Yes") {
- Que1Ans = "Yes";
- textarea.show();
- }
- else {
- Que1Ans = "No";
- Que1AnsOther = "Empty";
- textarea.hide();
- }
- } </script>
- </head>
- <body>
- <div class="colorBanner">
- <img src="Images/color-banner.jpg" class="img-responsiv floatLeft">
- </div>
- <div class="width100">
- <div class="heading">@Model.txtTitle </div>
- <div id="mainDiv" style="width: 100%; float: left; display: block;">
- <div class="centerDiv">
- <div class="policyBg width100">
- <div class="policyPadding">
- <div class="width100">
- @*<div class="width100 shadow-box-heading">
- @Model.txtHeader
- </div>
- *@
- </div>
- <div class="width100 top20">
- <div class="width100">@Model.txtQue1 </div>
- <div class="width40 top10">
- <input id="Check1" class="checkbox-custom" name="checkbox-2" value="Yes" type="checkbox" onclick="selectOnlyThis(this.id)"></input>
- <label for="Check1" class="checkbox-custom-label"></label>
- @Model.txtYes </div>
- <div class="width40 top10">
- <input id="Check2" class="checkbox-custom" name="checkbox-3" value="No" type="checkbox" onclick=" selectOnlyThis(this.id)"></input>
- <label for="Check2" class="checkbox-custom-label"></label>
- @Model.txtNo </div>
- <div class="width100 top10">
- <textarea id="textArea" class="inputTextarea width100" onkeydown="limitText(this,256)" onkeyup="limitText(this,256)" name="textarea" rows="3" cols="20" placeholder=" @Model.txtQue1place " style="padding: 0px;"></textarea>
- </div>
- </div>
- <div class="width100 top10">
- <div class="width100">@Model.txtQue2 </div>
- <div class="width50 top10">
- <input id="txt_town" type="text" class="inputLogin floatLeft" onkeydown="limitText(this,256)" onkeyup="limitText(this,256)" name="" placeholder="@Model.txtQue2place" style="padding: 0px; width: 95%;">
- </div>
- <div class="width50 top10">
- <input id="pincode" type="number" class="inputLogin floatLeft" onkeypress="if(this.value.length==6) return false;" min="0" name="" placeholder="@Model.txtQue2place2" pattern="[1-9][0-9]{5}" style="padding: 0px; width: 95%; float: right;">
- </div>
- </div>
- <div class="width100 top20">
- <div class="width100">@Model.txtQue3 </div>
- <div class="width100 top10">
- <input id="annualincome" type="number" onkeypress="if(this.value.length==15) return false;" min="0" class="inputLogin" name="" placeholder="@Model.txtQue3Place" style="padding: 0px; width: 100%;">
- </div>
- </div>
- <div class="width100 top10">
- <div class="width100 top10">@Model.txtQue4 </div>
- <div class="width50">
- <input id="chk1" class="checkbox-custom" value="SSC" name="checkbox-14" type="checkbox" onclick=" selectEducation(this.id)"></input>
- <label for="chk1" class="checkbox-custom-label"></label>
- @Model.txtSSC </div>
- <div class="width50">
- <input id="chk2" class="checkbox-custom" value="HSC" name="checkbox-15" type="checkbox" onclick=" selectEducation(this.id)"></input>
- <label for="chk2" class="checkbox-custom-label"></label>
- @Model.txtHSC </div>
- <div class="width50">
- <input id="chk3" class="checkbox-custom" value="Graduate" name="checkbox-16" type="checkbox" onclick=" selectEducation(this.id)"></input>
- <label for="chk3" class="checkbox-custom-label"></label>
- @Model.txtGraduate </div>
- <div class="width50">
- <input id="chk4" class="checkbox-custom" value="Diploma" name="checkbox-17" type="checkbox" onclick=" selectEducation(this.id)"></input>
- <label for="chk4" class="checkbox-custom-label"></label>
- @Model.txtDiploma </div>
- <div class="width100 top20" id="mainDiv">
- <div class="width100">
- <input id="txt_Others" type="text" class="inputLogin floatLeft" onkeydown="limitText(this,50)" onkeyup="limitText(this,50)" name="" placeholder="@Model.txtQue1place" style="padding: 0px; width: 100%;">
- </div>
- </div>
- </div>
- <div class="width100 top10">
- <div class="width100">@Model.txtQue6Nature </div>
- <div class="width100 top10">
- <input id="NatureOfOccupationAndDuties" type="text" onkeydown="limitText(this,256)" onkeyup="limitText(this,256)" class="inputLogin" name="" placeholder="@Model.txtQue6Place" style="padding: 0px; width: 100%;">
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="bottomBtnsContBG top10">
- <div class="width100">
- <div class="centerDiv" style="padding-bottom: 0px;">
- <table width="100%">
- <tr>
- <td width="15%"></td>
- <td width="20%" class="font16">
- <button id="btn_Continue" type="button" class='greenBt' onclick="validation()">@Model.txtContinue</button>
- </td>
- <td width="15%"></td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- <!-- <script type="text/javascript"> $(document).ready(function () { /* ------ Shift input on keboard Open ------ */ var origHeight = parseInt($(window).height()); var changeHeight, keyboardHeight; function shiftInput() { debugger; if ($(document.activeElement).attr('type') === 'text' || $(document.activeElement).attr('type') === 'tel' || $(document.activeElement).attr('type') === 'number') { // if (true) { //alert(origHeight); //$('.input-page-container>div.row').css('height', '100%'); changeHeight = parseInt($(window).height()); //alert(changeHeight); keyboardHeight = origHeight - changeHeight; //alert(keyboardHeight); var elePos = $(document.activeElement).parents().offset(); var eleTopPos = elePos.top + 60; //alert(eleTopPos); var eleBotPos = origHeight - eleTopPos; //alert(eleBotPos); if (eleBotPos <= keyboardHeight) { var toScroll = (keyboardHeight - eleBotPos) + 100; $('body').animate({ scrollTop: toScroll + 'px' }, 100); } else { //alert('outside'); } } else { // Logic for while keyboard is hidden //alert('Hi'); } } /* ------ END Shift inut on keyboard open ---- */ /* ------ Window Resize Function */ $(window).resize(function () { console.log("resize called"); //shiftInput(); }); /* ------ END Window Resize Function */ }); //window.onresize = function(event) { // console.log("resize called"); // shiftInput(); //}; </script> -->
- </body>
- </html>
Add Comment
Please, Sign In to add comment