אשכול: if בתוך if ב js
View Single Post
ישן 03-07-06, 19:07   # 3
barakdr
חבר חדש
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
הודעות: 23

barakdr לא מחובר  

אם כך יש למישהוא מושג מה הבעיה בסקריפט הזה:
HTML קוד:
<script>
function set_form_action(destination)
{
 if(document.edit.name.value=="")
 {
alert("לא ציינת שם");
document.edit.name.focus();
   return false;
  }
if (edit.change.checked == true )
{
 if(document.edit.newpass.value=="")
  {
alert("לא ציינת סיסמא חדשה");
document.edit.newpass.focus();
   return false;
  }
 if(document.edit.newpass2.value=="")
  {
alert("לא ציינת את השדה אישור סיסמא חדשה");
document.edit.newpass2.focus();
   return false;
  }
 if(document.edit.newpass.value<>document.edit.newpass2.value)
  {
alert("שדה הסיסמא החדשה ושדה אישור סיסמא חדשה אינם זהים");
   return false;
  }
}
document.edit.action=destination;
document.edit.submit();
}
</script>
  Reply With Quote