|
הרשם | ![]() |
שאלות ותשובות | ![]() |
רשימת חברים | ![]() |
לוח שנה | ![]() |
הודעות מהיום | ![]() |
חיפוש | ![]() |
|
![]() |
![]() |
|
כלים לאשכול | תצורת הצגה |
|
![]() |
# 1 |
חסום
|
בעיה | שליחת טופס אם כפתור תמונה
הטופס של ההתחברות של האתר שלי לא נישלח אם אני מישתמש בכפתור תמונה אבל אם אני משתמש בכפתור שליחה רגיל הדף נשלח
הקוד של הכפתור של התמונה: HTML קוד:
<input type="image" name="submit" src="images/conect.gif">
|
![]() |
![]() |
# 2 |
חבר וותיק
|
__________________
מתכנת php אמין ומקצועי. מחירים נוחים! יצירת קשר: 0544378743 |
![]() |
![]() |
# 3 |
חסום
|
לא עוזר כלום תיראו תקוד של הhtml ותקוד של הphp
PHP קוד:
HTML קוד:
<tr> <td> <table cellspacing="0" align="right"> <tr> <td align="center" width="260" height="21" align="left" bgcolor="#FFFFFF" style="background-image: url(images/bar.gif); background-repeat: no-repeat;"> <font color="#FFFFFF" face="arial" style="font-size:13pt;">התחברות</font> </td> </tr> <tr> <td width="250" height="113" bgcolor="#D3D3D3"> <table> <tr> <td> <form name="myform" action="index.php" method="POST"> <font color="#000000" face="arial" style="font-size:12pt;"> שם משתמש: </font> </td> <td> <input type="text" name="username"> </td> </tr> <tr> <td> <font color="#000000" face="arial" style="font-size:12pt;"> סיסמה: </font> </td> <td> <input type="text" name="password"> </td> </tr> </table> <center><input type="image" name="mylogin" src="images/conect.gif"></center> </form> </td> </tr> |
![]() |
![]() |
# 5 |
חסום
|
הקוד עוד לא גמור לפני כול אלה עשיתי גם ניסוי ובימקום כול מה שיש בelse שמתי echo '123'; כדי ליבדוק עם זה מדפיס משהו אם לוחצים על הכפתור וזה לא מדפיס כלום
|
![]() |
![]() |
# 6 |
חבר בקהילה
|
דבר ראשון הלוגיקה של הקוד שלך מטומטמת.
כמו שEAStyle אמר, בשביל מה אתה עושה תנאי ריק? בשביל מה if else?..אפשר להוריד פה חצי מהקוד. דבר שני, יכול להיות שכפתור תמונה מתנהג כbutton. מה שאתתה יכול לעשות זה בJS קוד:
<script type="text/javascript"> function submitForm() { document.form.submit(); } </script> <form name="form" method="post" action="..."> <input type="image" ... onclick="submitForm" /> </form> |
![]() |
![]() |
# 7 |
חסום
|
עשיתי:
HTML קוד:
<tr> <td width="250" height="113" bgcolor="#D3D3D3"> <table> <tr> <td> <script type="text/javascript"> function submitForm() { document.form.submit(); } </script> <form name="myform" action="index.php" method="POST"> <font color="#000000" face="arial" style="font-size:12pt;"> שם משתמש: </font> </td> <td> <input type="text" name="username"> </td> </tr> <tr> <td> <font color="#000000" face="arial" style="font-size:12pt;"> סיסמה: </font> </td> <td> <input type="text" name="password"> </td> </tr> </table> <center><input type="image" name="mylogin" src="images/conect.gif" onclick="submitForm></center> </form> </td> </tr> PHP קוד:
|
![]() |
![]() |
# 8 |
חבר מתקדם
|
כשאתה מנסה את הקוד עם Button רגיל זה עובד ?
דרך אגב בקוד HTML האחרון ששלחתי שחכת לשים גרשיים: HTML קוד:
onclick="submitForm> |
![]() |
![]() |
# 9 |
חבר בקהילה
|
בפונקציה שנתתי לך אתה צריך לשנות את הform לשם הטופס שלך, במקרה הזה myForm, ושכחת לסגור את הonclick ולקרוא לפונקציה עם ().
|
![]() |
![]() |
# 10 |
חבר מתקדם
|
הנה הקוד המתוקן, תנסה....
HTML קוד:
<tr> <td width="250" height="113" bgcolor="#D3D3D3"> <table> <tr> <td> <script type="text/javascript"> function submitForm() { document.myform.submit(); } </script> <form name="myform" action="index.php" method="POST"> <font color="#000000" face="arial" style="font-size:12pt;"> שם משתמש: </font> </td> <td> <input type="text" name="username"> </td> </tr> <tr> <td> <font color="#000000" face="arial" style="font-size:12pt;"> סיסמה: </font> </td> <td> <input type="text" name="password"> </td> </tr> </table> <center><input type="image" name="mylogin" src="images/conect.gif" onclick="javascript:submitForm();"></center> </form> </td> </tr> |
![]() |
![]() |
חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים) | |
|
|