Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%--
- Document : index
- Created on : 29/11/2015, 07:23:51
- Author : Arthur
- --%>
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>מבחן בתכנות בסביבת אינטרנט</title>
- <script type="text/javascript">
- function checkForm()
- {
- var name = document.forms["muamadForm"]["userName"].value;
- var age = document.forms["muamadForm"]["gil"].value;
- if(!checkName(name))
- {
- alert("Name only in English. First letter Capital.");
- document.forms["muamadForm"]["userName"].focus();
- document.forms["muamadForm"]["userName"].select();
- return;
- }
- if(!checkAge(age))
- {
- alert("Age from 21 to 50.");
- document.forms["muamadForm"]["userName"].focus();
- document.forms["muamadForm"]["userName"].select();
- return;
- }
- if(!checkPhone())
- {
- alert("02 or 03 or 04 + and 7 numbers with 0 first.");
- return;
- }
- if(!checkMazav())
- {
- alert("Select at least 1 mazav mishpahti.");
- return;
- }
- if(!checkLanguages())
- {
- alert("Select at least 2 languages.");
- return;
- }
- if(!checkJob())
- {
- alert("Regions all different. Select at least one");
- return;
- }
- if(!checkExperience())
- {
- alert("Experience Box 20 letters+.");
- document.forms["muamadForm"]["nisayonBox"].focus();
- document.forms["muamadForm"]["nisayonBox"].select();
- return;
- }
- }
- function checkName(name)
- {
- var pattern = /^[A-Z]([a-zA-Z]*)$/;
- return pattern.test(name);
- }
- function checkAge(age)
- {
- var ageInt = parseInt(age);
- return (ageInt > 20 && ageInt < 51);
- }
- function checkPhone()
- {
- var a = document.forms["muamadForm"]["kidomet"].value;
- if (!(a === "02" || a === "03" || a === "04"))
- return false;
- var b = document.forms["muamadForm"]["number"].value;
- if (b.charAt(0) === '0')
- return false;
- var pattern = /^[0-9]+$/;
- if (!b.test(pattern))
- {
- return false;
- }
- if (b.length !== 7)
- return false;
- return true;
- }
- function checkMazav()
- {
- for (var i = 0; i < 4; i++)
- {
- if(document.forms.muamadForm.mazav[i].checked)
- {
- return true;
- }
- }
- return false;
- }
- function checkLanguages()
- {
- var count = 0;
- if(document.muamadForm.safa1.checked)
- {
- count++;
- }
- if(document.muamadForm.safa2.checked)
- {
- count++;
- }
- if(document.muamadForm.safa3.checked)
- {
- count++;
- }
- if(document.muamadForm.safa4.checked)
- {
- count++;
- }
- if(count < 2)
- return false;
- return true;
- }
- function checkJob()
- {
- var a1 = document.muamadForm.ezor1.selectedIndex;
- var a2 = document.muamadForm.ezor2.selectedIndex;
- var a3 = document.muamadForm.ezor3.selectedIndex;
- if(a1 !== a2 && a2 !== a3 && a1 !== a3 && a1 !==0 && a2 !==0 && a3 !==0)
- return true;
- return false;
- }
- function checkExperience()
- {
- return (document.forms["muamadForm"]["nisayonBox"].value.length > 19);
- }
- </script>
- </head>
- <body bgColor="azure">
- <div dir="rtl" align="right">
- <center> <B><U>
- <font size="5" color="blue">טופס הגשת מועמדות</font><br>
- <font size="5" color="blue">למשרת מהנדס תוכנה בכיר בחברת הייטק</font>
- </U></B><br><br><br>
- </center>
- </div>
- <form name="muamadForm" method="post" action="" onsubmit = "return checkForm()">
- <table dir="rtl" align="center" border="0">
- <tr>
- <td>
- <b><font size="3" color="blue">שם מועמד:</font></b></td>
- <td><input type="text" name="userName"></td>
- </tr>
- <tr>
- <td><b><font size="3" color="blue">גיל:</font></b></td>
- <td><input type="text" name="gil"></td>
- </tr>
- <tr>
- <td>
- <b><font size="3" color="blue">מספר טלפון:</font></b></td>
- <td><input type="text" name="number"></td>
- <td><input type="text" name="kidomet"></td>
- </tr>
- <tr>
- <td>
- <b><font size="3" color="blue">מצב משפחתי:</font></b>
- </td>
- <td>
- <input type="radio" name="mazav" value="ravak" />
- <font size="3" color="blue">רווק</font>
- <input type="radio" name="mazav" value="nasui" />
- <font size="3" color="blue">נשוי</font>
- <input type="radio" name="mazav" value="garush" />
- <font size="3" color="blue">גרוש</font>
- <input type="radio" name="mazav" value="alman" />
- <font size="3" color="blue">אלמן</font>
- </td>
- </tr>
- <tr>
- <td>
- <b><font size="3" color="blue">שליטה בשפות תכנות:</font></b>
- </td>
- <td>
- <input type="checkbox" name="safa1" value="java" />
- <font size="3" color="blue">ג'אווה</font>
- <input type="checkbox" name="safa2" value="vb" />
- <font size="3" color="blue">ויזואל בייסיק</font>
- <input type="checkbox" name="safa3" value="asembler" />
- <font size="3" color="blue">אסמבלר</font>
- <input type="checkbox" name="safa4" value="csharp" />
- <font size="3" color="blue">סי-שארפ</font>
- </td>
- </tr>
- <tr>
- <td><b><font size="3" color="blue">עדיפות לאיזור עבודה:</font></b></td>
- <td>
- <font size="3" color="blue">1.</font>  
- <select name="ezor1">
- <option value="בחר איזור">בחר איזור</option>
- <option value="צפון הארץ">צפון הארץ</option>
- <option value="מרכז הארץ">מרכז הארץ</option>
- <option value="ירושלים">ירושלים</option>
- <option value="דרום הארץ">דרום הארץ</option>
- </select>  
- <font size="3" color="blue">2.</font>  
- <select name="ezor2">
- <option value="בחר איזור">בחר איזור</option>
- <option value="צפון הארץ">צפון הארץ</option>
- <option value="מרכז הארץ">מרכז הארץ</option>
- <option value="ירושלים">ירושלים</option>
- <option value="דרום הארץ">דרום הארץ</option>
- </select>  
- <font size="3" color="blue">3.</font>  
- <select name="ezor3">
- <option value="בחר איזור">בחר איזור</option>
- <option value="צפון הארץ">צפון הארץ</option>
- <option value="מרכז הארץ">מרכז הארץ</option>
- <option value="ירושלים">ירושלים</option>
- <option value="דרום הארץ">דרום הארץ</option>
- </select>
- </td>
- </tr>
- <tr>
- <td>
- <b><font size="3" color="blue">ניסיון תעסוקתי קודם:</font></b>
- </td>
- <td>
- <textarea rows="5" cols="30" name="nisayonBox"></textarea>
- </td>
- </tr>
- <tr><td> </td></tr>
- <tr><td> </td></tr>
- <tr><td> </td></tr>
- <tr>
- <td> </td>
- <td>          
- <input type="submit" value="בדוק טופס">     
- <input type="reset" value="נקה">
- </td>
- </tr>
- </table>
- </form>
- <br/><br/><br/>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement