הרשם שאלות ותשובות רשימת חברים לוח שנה חיפוש הודעות מהיום סמן פורומים כנקראו

   
|!|

 
 
כלים לאשכול תצורת הצגה
Prev הודעה קודמת   הודעה הבאה Next
ישן 21-06-09, 11:04   # 1
Megnum
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: May 2007
מיקום: אשד
הודעות: 1,308

Megnum לא מחובר  

גאווה סקריפט | לא מוצא את הבעיה

היי, רשמתי את הקוד הבא והוא אמור לבצע ככה: אם הערך ריק אז המסגרת הופכת לאדום ואם הערך גדול מ2 הוא אמור לצבוע לירוק ומשום מה זה פשוט לא עובד נכון. אם אני מכניס ערך כלשהו אפילו שהוא קטן מ 2 הוא מסמן בירוק ואם הערך ריק הוא לא מסמן באדום כמו שהוא אמור להיות ובFF הוא בכלל לא עובד הקוד הזה.

הינה הקוד:
HTML קוד:
<html dir="rtl">
<head>
<title>s</title>
<script  language="javascript">
function check_error(id) {

if (document.contact.id.length < 2) {
document.getElementById(id).style.border="1px dotted #58B52D";
document.getElementById(id).style.background="url(accept.png) left no-repeat 10px;";
}

else {
document.getElementById(id).style.border="1px dotted red";
}

}


</script>
<style>
form.contact {width: 550px; background: url(icon_contact.gif) left top no-repeat 60px;}
input.type {border: 1px  dotted black; margin-top: 6px; color: #808080; width: 310px; font-size: 11px;}
input.submit {border:  0px; font-size:11px; color: #FF5900; width: 80px; text-align: right; font-weight: bold; background: none; font-wieght: bold; font-size: 11px;}
textarea.content {margin-top: 6px; font-size: 11px;  border: 1px  dotted #BFBFBF; font-family: "ariel", sans-serif; color: #808080; background: url(contact.gif) top repeat-x;}
h3 { margin:  1px 1px 1px 1px; font-family:ariel, sans-serif ;}
</style>


</head>
<body>
<form method="post" action="" name="contact" class="contact" onload="void();">
<table>
</table>
<h3>פנייה ישירה בטלפון: 0546280268</h2>
<input type="text" class="type" name="first_name"  value='*שם פרטי' onclick="this.value=''" onkeypress="check_error('first_name');" /><br />
<input type="text" class="type" name="last_name"  value='*שם משפחה' onclick="this.value=''" onkeypress="check_error('last_name');" /><br />
<input type="text" class="type" name="email"  value='*דואר אלקטרוני' onclick="this.value=''" onkeypress="check_error('email');"/><br />
<input type="text" class="type" name="phone"  value='טלפון' onclick="this.value=''" onkeypress="check_error('phone');" /><br />
<input type="text" class="type" name="pelephone"  value='פלאפון' onclick="this.value=''" onkeypress="check_error('pelephone');" /><br />
<input type="text" class="type" name="fax"  value='פקס' onclick="this.value=''" onkeypress="check_error('fax');" /><br />
<textarea name="content" class="content" onkeyup="check_error('content');" rows="10" cols="70">רשום כאן את תוכן הפנייה</textarea>
</form> 











</body>
</html>

תודה לעוזרים!
  Reply With Quote
 

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 

כלים לאשכול
תצורת הצגה

חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 19:27.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ