J'ai un petit soucis avec un bout de code sur mon forum.
Ce code sert à valider un formulaire avec un bouton.
Quand je suis sous Internet Explorer, ça fonctionne.
Mais si j'utilise Firefox ou Mozilla, le bouton est sans effet : il se presse mais aucune action n'est effectué.
Voici l'erreur qui s'affiche dans la console JS :
Code : Tout sélectionner
Error: nideleteform is not defined
Source File: http://www.monsiteperso.com/forum/index.php?&act=NI
Line: 270
Code : Tout sélectionner
<form method='POST' style='display:inline' name='nideleteform' action='{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}'>
<input type='hidden' name='s' value='{$ibforums->session_id}'>
<input type='hidden' name='act' value='NI'>
<input type='hidden' name='perform' value='delete'>
Code : Tout sélectionner
<input type='hidden' name='nb' value='119'><input onClick='confirmation()' type='button' value='Effectuer les opérations cochées'>

Code : Tout sélectionner
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
<title>Monsite</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<style type="text/css">
html { overflow-x: auto }
BODY { background-color:#fff29e; color:#000000; font-family: Verdana, Arial; font-size: 8.5pt; margin:0px 30px 0px 30px}
TABLE, TR, TD {font-family: Verdana, Tahoma, Arial; font-size: 8.5pt; color: #000000}
#ipbwrapper { text-align: left; width: 95%; margin-left: auto; margin-right: auto; }
a:link, a:visited, a:active { color: #451f66; text-decoration: none; background-color: transparent; top: 1.5px; left: 1.5px;}
a:hover { color: #724999}
fieldset.search { padding: 6px; line-height: 150%; background-color: #FFFFCC; color:#000000}
label { cursor: pointer }
form { display: inline }
img { vertical-align: middle; border: 0px }
img.attach { border: 2px outset #EEF2F7; padding: 2px }
.googleroot { padding: 6px; line-height: 130% }
.googlechild { padding: 6px; margin-left: 30px; line-height: 130% }
.googlebottom, .googlebottom a:link, .googlebottom a:visited, .googlebottom a:active { font-size: 11px; color: #ffe900}
.googlish, .googlish a:link, .googlish a:visited, .googlish a:active { font-size: 14px; font-weight: bold; color: #ffe900}
.googlepagelinks { font-size: 1.1em; letter-spacing: 1px }
.googlesmall, .googlesmall a:link, .googlesmall a:active, .googlesmall a:visited { font-size: 10px; color: #ffe900}
li.helprow { padding: 0px; margin: 0px 0px 10px 0px }
ul#help { padding: 0px 0px 0px 15px }
option.cat { font-weight: bold }
option.sub { font-weight: bold; color: #000000 }
.caldate { text-align: right; font-weight: bold; font-size: 11px; color: #000000; background-color: #FFFFCC ; padding: 4px; margin: 0px }
.warngood { color: green }
.warnbad { color: red }
#padandcenter { margin-left: auto; margin-right: auto; text-align: center; padding: 14px 0px 14px 0px }
#profilename { font-size: 28px; font-weight: bold }
#calendarname { font-size: 22px; font-weight: bold }
#photowrap { padding: 6px }
#phototitle { font-size: 24px; border-bottom: 1px solid black }
#photoimg { text-align: center; margin-top: 15px }
#ucpmenu { line-height: 150%; width: 22%; border: 1px solid #ffc665 ; background-color: #FFFFCC }
#ucpmenu p { padding: 2px 5px 6px 9px; margin: 0px }
#ucpcontent { background-color: #ffffcc ; border: 1px solid #ffc665 ; line-height: 150%; width: auto }
#ucpcontent p { padding: 10px; margin: 0px }
#ipsbanner { position: absolute; top: 1px; right: 5% }
#logostrip { background-color: #ffd998; padding: 0px; margin: 0px }#submenu { border: 1px solid #345487; background-color: #5061c4; font-size: 10px; margin: 3px 0px 3px 0px; color: #000000; font-weight: bold }
#submenu a:link, #submenu a:visited, #submenu a:active { font-weight: bold; font-size: 10px; text-decoration: none; color: #ffe900}
#userlinks { border: 1px solid #FFF29E; background-color: #FFFFCC }
#navstrip { font-weight: bold; color: #000000; font-size: 8.5pt }
.activeuserstrip { background-color: #FFFFCC; padding: 6px; background-image: url(style_images/Onpeutle/cellpic1.gif) }
.pformstrip { background-color: #fbd188 }
.pformleft { background-color: #fff29e ; padding: 6px; margin-top: 1px; width: 25%; border-top: 1px solid #ffc665 ; border-right: 1px solid #ffc665 }
.pformleftw { background-color: #FFFFCC ; padding: 6px; margin-top: 1px; width: 40%; border-top: 1px solid #ffc665 ; border-right: 1px solid #ffc665 }
.pformright { background-color: #FFFFCC; padding: 6px; margin-top: 1px; border-top: 1px solid #ffc665 }
.signature { font-size: 7.5pt; color: #000000 }
.postdetails {font-size: 7.5pt}
.postcolor { font-size: 9pt; line-height: 160%; color: #000000 }
.normalname { font-size: 12px; font-weight: bold; color: #451F66; padding-bottom: 2px }
.normalname a:link, .normalname a:visited, .normalname a:active { text-decoration: none; color: #451F66; padding-bottom: 2px }
.unreg { font-size: 11px; font-weight: bold; color: #990000 }
.post1 { background-color: #ffffcc}
.post2 { background-color: #fff29e}
.postlinksbar { background-color: #fff29e; padding: 7px; margin-top: 1px; font-size: 10px; background-image: url(style_images/Onpeutle/cellpic1.gif) }
.row1 { background-color: #ffffcc; color: #000000}
.row2 { background-color: #ffffcc; color: #000000}
.row3 { background-color: #fff29e; color: #000000}
.row4 { background-color: #fff29e; color: #000000}
.row5 { background-color: #ffffa3}
.row6 { background-color: #fcd994}
.darkrow1 { font-weight:bold; color:#000000;height: 24px}
.darkrow2 { font-weight:bold; color:#000000;height: 24px}
.darkrow3 { font-weight:bold; color:#ffc665;height: 24px}
.demarquation-favoris { font-weight:bold; background-color: #FFD089 ; color: #000000}
.ligne-separation-post { background-color: #ffffcc; font-weight:bold; color:#cfd8f9;height: 24px}
.hlight { background-color: #ffd98a}
.dlight { background-color: #ffffcc}
.titlemedium { font-weight:bold;font-size: 11px; color:#000000; height: 15px; background-color: #ffffcc; background-image: url(style_images/Onpeutle/cellpic1.gif) }
.titlemedium a:link, .titlemedium a:visited, .titlemedium a:active { text-decoration: none; color: #000000 }
.maintitle { vertical-align:middle; padding:8px 0px 8px 5px; font-weight:bold; font-size: 11px; color:#451f66; background-image: url(style_images/Onpeutle/cellpic3.gif) }
.maintitle a:link, .maintitle a:visited, .maintitle a:active { text-decoration: none; color: #451f66; font-weight: bold}
.maintitle a:hover { text-decoration: none; color:#724999}
.annonceborder { border: 1px solid #ffc665 ; background-color: #ffc665 }
.plainborder { border: 1px solid #ffc665 ; background-color: #ffc665 }
.tableau { background-color: #f9d661; border: 1px #f98484 solid; }
.tableborder { border: 1px solid #ffc24b; background-color: #ffc665 ; padding: 0; margin: 1}
.tablefill { border: 1px solid #ffc665 ; padding: 6px; background-color: #FFFFCC }
.tablepad { background-color: #FFFFCC; padding: 6px }
.tablebasic { width: 100%; padding: 0px 0px 0px 0px; margin: 0px; border: 0px }
.wrapmini { float: left; line-height: 1.5em; width: 25% }
.pagelinks { float: left; line-height: 1.2em; width: 35% }
.desc { font-size: 8.0pt; color: #000000}
.edit { font-size: 9px }
.searchlite { font-weight: bold; color: #000000; background-color:#ff0000 }
#QUOTE { font-family: Verdana, Arial; font-size: 8pt; color: #724999; background-color: #ffffe0; border-left: 4px solid #724999; border-right: 1px dotted #000; border-bottom: 1px dotted #000; border-top: 1px dotted #000; padding: 4px; margin: 0px auto 8px auto; }
#CODE { font-family: Courier New, Courier, Verdana, Arial; font-size: 8pt; color: #000000; background-color: #b2adff; border-left: 4px solid #4d59a8; border-right: 1px dotted #000; border-bottom: 1px dotted #000; border-top: 1px dotted #000; padding: 4px; margin: 0px auto 8px auto; }
.copyright { font-family: Verdana, Tahoma, Arial, Sans-Serif; font-size: 9px; line-height: 12px }
.codebuttons { font-size: 8.5pt; font-family: verdana, helvetica, sans-serif; vertical-align: middle }
.forminput, .textinput, .radiobutton, .checkbox { font-size: 9pt; font-family: verdana, helvetica, sans-serif; vertical-align: middle }
.thin { padding: 6px 0px 6px 0px; line-height: 140%; margin: 2px 0px 2px 0px; border-top: 1px solid #ffc665 ; border-bottom: 1px solid #ffc665 }
.purple { color: purple; font-weight: bold }
.red { color: red; font-weight: bold }
.green { color: green; font-weight: bold }
.blue { color: blue; font-weight: bold }
.orange { color: #F90; font-weight: bold }
.monlogofond {}
.monlogofondtableau {border-collapse: collapse; border-color:#11111; background-gcolor:#ffd998}
.cadre-du-menu { border-collapse: collapse; margin: 3px 0px 3px 0px; color: #ffffff }
.monlogocaseleft {}
.monlogocasemiddle {}
.monlogocaseright {}
.monlogotextecouleur{color:#000000}
.montop10 {background-color:#ffc665}
.monredirect{background-image: url(style_images/dsssddd/logofondredirect.jpg); background-color:#FFD089; color:#FFD089}
.monredirect a:link{color:#000080}
.monredirect a:visited{color:#800080}
.monglowname{position:relative; width=80%; filter:glow(color=0000ff)}
.monglowforum{position:relative; width=80%; filter:glow(color=d07d2a)}
.moncellcolor1{background-color:#fff29e;}
.white { color: #000000; font-weight: bold }
.pni_oui { color: #ff0000; font-weight: bold }
.quotetop2
{
font-family: Verdana, Arial; font-size: 7pt; color: #fffffe; background-color: #7882CC; border-left: 4px solid #3447af; border-right: 1px dotted #000; border-bottom: 1px dotted #000; border-top: 1px dotted #000; padding: 0px; margin: 0px auto 8px auto;
color: #000;
background-image: url(style_images/dsssddd/css_img_quote.gif);
background-position: right;
background-repeat: no-repeat;
}
.calendar_event { background-color:#c9b0e5; color:#724999; padding:3px; border-top:3px outset #724999; border-bottom:3px outset #724999; }
.Tableau_titre { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; color: #000000; font-weight: bold}
.Tableau_partie_1 { font-family: Verdana, Arial, Helvetica, san-serif; font-size: 18px; font-weight: normal; color: #000000; font-style: normal }
.Tableau_partie_2 { font-family: Verdana, Arial, Helvetica, san-serif; font-size: 16px; font-weight: bold; color: #000000; font-style: normal }
.Tableau_partie_3 { font-family: Verdana, Arial, Helvetica, san-serif; font-size: 14px; font-weight: bold; color: #000000; font-style: normal }
.Tableau_texte_normal { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal}
</style>
</head>
<body bgproperties="fixed" leftmargin="0" topmargin="0" alink="#336666" background="pni_files/degrade-nb.jpeg" bgcolor="#ffd089" marginheight="0" marginwidth="0" text="#000000" vlink="#336666">
<!--div id="ipbwrapper"-->
<script language="JavaScript" type="text/javascript">
macouleurcellules1='#fff2b5';
macouleurborderlight='#FFFFFF';
macouleurborderdark='#8B8B8B';
</script>
<br>
<script language="JavaScript" type="text/javascript">
<!--
function buddy_pop() { window.open('index.php?act=buddy&s=','BrowserBuddy','width=250,height=500,resizable=yes,scrollbars=yes'); }
function chat_pop(cw,ch) { window.open('index.php?s=&act=chat&pop=1','Chat','width='+cw+',height='+ch+',resizable=yes,scrollbars=yes'); }
function multi_page_jump( url_bit, total_posts, per_page )
{
pages = 1; cur_st = parseInt(""); cur_page = 1;
if ( total_posts % per_page == 0 ) { pages = total_posts / per_page; }
else { pages = Math.ceil( total_posts / per_page ); }
msg = "Veuillez entrer un numéro de page à atteindre entre 1 et" + " " + pages;
if ( cur_st > 0 ) { cur_page = cur_st / per_page; cur_page = cur_page -1; }
show_page = 1;
if ( cur_page < pages ) { show_page = cur_page + 1; }
if ( cur_page >= pages ) { show_page = cur_page - 1; }
else { show_page = cur_page + 1; }
userPage = prompt( msg, show_page );
if ( userPage > 0 ) {
if ( userPage < 1 ) { userPage = 1; }
if ( userPage > pages ) { userPage = pages; }
if ( userPage == 1 ) { start = 0; }
else { start = (userPage - 1) * per_page; }
window.location = url_bit + "&st=" + start;
}
}
//-->
</script>
<!--IBF.BANNER-->
<center>
<!-- IE6/Win TABLE FIX -->
</center>
<br>
<br>
<div id="navstrip" align="left"></div>
<br>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="">
<tbody>
<tr>
<td>
<script language="javascript">
<!--
function confirmation()
{
resultat = confirm('Attention les opérations effectuées (effacer/RAZ) sont irréversibles. Voulez-vous continuer ?');
if(resultat==true){
nideleteform.submit()}
}
//-->
</script>
<!-- START NI -->
<form method="post" style="display: inline;" name="nideleteform" action="http://www.monsite.com/forum/index.php">
<input name="s" value="" type="hidden">
<input name="act" value="NI" type="hidden">
<input name="perform" value="delete" type="hidden">
<table class="tableborder" align="center" border="0" cellpadding="3" cellspacing="1" width="100%">
<tbody>
<tr class="titlemedium">
<td>Post n°</td>
<td>Auteur</td>
<td>Date</td>
<td align="center">> 30 jours</td>
<td align="center">Votes contre</td>
<td align="center">Votes pour</td>
<td align="center">Membres contre</td>
<td align="center">Membres pour</td>
<td align="center">RAZ votes</td>
<td align="center">Effacer post</td>
</tr>
<!-- Begin NI Entry 36279 -->
<tr class="row4">
<td> <a href="http://www.monsite.com/forum/viewtopic.php?p=36279&s=" id="linkthru" title="Voir ce post" target="_blank">36279</a>
</td>
<td> <a href="http://www.monsite.com/forum/index.php?act=Profile&CODE=03&MID=49&s=" id="linkthru" title="Voir ce membre" target="_blank">Robert
Bidochon</a> </td>
<td> Mardi 11 Novembre 2003, 01:09 </td>
<td align="center"> <font class="pni_oui"><b>oui</b></font> </td>
<td align="center"> 1 </td>
<td align="center"> 0 </td>
<td align="center"> Shivaya </td>
<td align="center"> </td>
<td align="center">
<input name="raz1" type="checkbox">
<input name="1" value="36279" type="hidden">
</td>
<td align="center">
<input name="delete1" type="checkbox">
</td>
</tr>
<!-- End NI Entry -->
<!-- Begin NI Entry 36285 -->
<tr class="row4">
<td> <a href="http://www.monsitecom/forum/viewtopic.php?p=36285&s=" id="linkthru" title="Voir ce post" target="_blank">36285</a>
</td>
<td> <a href="http://www.monsite.com/forum/index.php?act=Profile&CODE=03&MID=63&s=" id="linkthru" title="Voir ce membre" target="_blank">Nériane</a>
</td>
<td> Mardi 11 Novembre 2003, 13:01 </td>
<td align="center"> <font class="pni_oui"><b>oui</b></font> </td>
<td align="center"> 1 </td>
<td align="center"> 0 </td>
<td align="center"> Shivaya </td>
<td align="center"> </td>
<td align="center">
<input name="raz2" type="checkbox">
<input name="2" value="36285" type="hidden">
</td>
<td align="center">
<input name="delete2" type="checkbox">
</td>
</tr>
<!-- End NI Entry -->
<tr class="titlemedium">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td colspan="2" align="center">
<input name="nb" value="28" type="hidden">
<input onclick="confirmation()" value="Effectuer les opérations cochées" type="button">
</td>
</tr>
<tr class="maintitle">
<td colspan="10" align="center">
<table cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr class="titlemedium">
<td align="center">Nb posts NI total: <font size="3">28</font></td>
<td align="center">Nb posts NI > 30 jours: <font size="3">20</font></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</form>
<!-- END NI -->
</td>
</tr>
<tr>
<td><br>
Critères de tri:
<form method="post" style="display: inline;" name="niform" action="http://www.monsite.com/forum/index.php">
<input name="s" value="" type="hidden">
<input name="act" value="NI" type="hidden">
<select name="tri1" class="forminput" style="font-weight: bold; color: red;">
<option value="-1" style="color: black;">1er critère</option>
<option style="color: black;" value="-1">aucun</option>
<option value="1">Tri par auteur</option>
<option selected value="2">Tri par date</option>
<option value="3">Tri par votes</option>
</select>
<select name="tri2" class="forminput" style="font-weight: bold; color: red;">
<option value="-1" style="color: black;">2ème critère</option>
<option selected style="color: black;" value="-1">aucun</option>
<option value="1">Tri par auteur</option>
<option value="2">Tri par date</option>
<option value="3">Tri par votes</option>
</select>
<select name="tri3" class="forminput" style="font-weight: bold; color: red;">
<option value="-1" style="color: black;">3ème critère</option>
<option selected style="color: black;" value="-1">aucun</option>
<option value="1">Tri par auteur</option>
<option value="2">Tri par date</option>
<option value="3">Tri par votes</option>
</select>
<input value="Ok" class="forminput" type="submit">
</form>
<br>
</td>
</tr>
<tr>
<td class="mainbg">
<table align="center" border="0" cellpadding="4" cellspacing="1" width="100%">
<tbody>
<tr>
<td class="titlemedium" align="left"> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<div align="center"></div>
<br>
<!-- mod_resize_images begin -->
<script language="javascript">
<!--
function IsMS () {
var temp = navigator.appName;
return temp.search(/microsoft/i);
}
var temp_image = new Image();
scale = 1024/document.body.offsetWidth;
for (var i = 0; i < document.images.length; i++) {
temp_image.src = document.images[i].src;
scale = document.images[i].width/600;
if (scale == 0) { scale = temp_image.width/600; }
if (scale > 1) {
if (IsMS() == -1) {
document.images[i].height = Math.round(document.images[i].height/scale);
document.images[i].width = Math.round(document.images[i].width/scale);
} else {
document.images[i].height = Math.round(temp_image.height/scale);
document.images[i].width = Math.round(temp_image.width/scale);
}
}
}
//-->
</script>
<!-- mod_resize_images end -->
</body></html>

Vous auriez une idée ?