הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   [JS] בעיה עם הפקודה submit() בכפתור רגיל (https://hosts.co.il/forums/showthread.php?t=56361)

fulsyp 12-11-07 01:33

הינה:
קוד:

function conf(){
var isConfirmed = confirm('האם אתה בטוח?');
if(isConfirmed){
return true;
}
form1.reset();
return false;
}

וזה הקוד של הטופס:
HTML קוד:

<form action="...php?act=deletecm" method="post" id="form1" onsubmit="return conf();">
  <table class="pmt">
  <tr>
    <th>כותרת</th>
    <th>תאריך שליחה</th>
    <th>מחיקה</th>
  </tr>  <tr>
  <td>123123</td>
  <td>11/11/2007, 20:05</td>
  <td><input type="checkbox" name="del[8]" value="1" class="delBox" /></td>
  </tr>  <tr>
  <td>123123</td>
  <td>11/11/2007, 20:05</td>
  <td><input type="checkbox" name="del[9]" value="1" class="delBox" /></td>
  </tr>  <tr>
  <td>מעפן!</td>
  <td>11/11/2007, 18:41</td>
  <td><input type="checkbox" name="del[2]" value="1" class="delBox" /></td>
  </tr>  <tr>
  <td>זה רק דני</td>
  <td>11/11/2007, 18:45</td>
  <td><input type="checkbox" name="del[3]" value="1" class="delBox" /></td>
  </tr>  <tr>
  <td colspan="4" align="left"><input type="button" name="submit" value="מחיקה" /></td>
  </tr></table></form>


mayden 12-11-07 11:03

כי עשית:
קוד:

<form id="form1">
ואתה צריך לשים לו NAME:
קוד:

<form name="bla">

חיים 12-11-07 12:35

ציטוט:

נכתב במקור על ידי fsp (פרסם 577876)
הינה:
קוד:

function conf(){
var isConfirmed = confirm('האם אתה בטוח?');
if(isConfirmed){
return true;
}
form1.reset();
return false;
}

וזה הקוד של הטופס:
HTML קוד:

<form action="...php?act=deletecm" method="post" id="form1" onsubmit="return conf();">
  <table class="pmt">
  <tr>
    <th>כותרת</th>
    <th>תאריך שליחה</th>
    <th>מחיקה</th>
  </tr>  <tr>
  <td>123123</td>
  <td>11/11/2007, 20:05</td>
  <td><input type="checkbox" name="del[8]" value="1" class="delBox" /></td>
  </tr>  <tr>
  <td>123123</td>
  <td>11/11/2007, 20:05</td>
  <td><input type="checkbox" name="del[9]" value="1" class="delBox" /></td>
  </tr>  <tr>
  <td>מעפן!</td>
  <td>11/11/2007, 18:41</td>
  <td><input type="checkbox" name="del[2]" value="1" class="delBox" /></td>
  </tr>  <tr>
  <td>זה רק דני</td>
  <td>11/11/2007, 18:45</td>
  <td><input type="checkbox" name="del[3]" value="1" class="delBox" /></td>
  </tr>  <tr>
  <td colspan="4" align="left"><input type="button" name="submit" value="מחיקה" /></td>
  </tr></table></form>


תודה תודה תודה תודה רבה רבה רבה רבה!!!
זה פעל :-D:-D:-D
תודה גם לכל אלו שניסו לעזור תודה רבה גם לאלו שלא ניסו לעזור |קורץ|
בקיצור תודה רבה לכולם אפשר לנעול :-D


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

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