Rechercher : dans
Par :

Input Javascript IE 6.0 ok / Firefox3 non...

Dernière réponse le 28 aoû 2008 à 12:36:09 Javascript, le 28 aoû 2008 à 12:35:00 
 Signaler ce message aux modérateurs

Bonjour,

Alors voilà j'ai un ptit probleme.

Ca fait 2 JOURS que je suis là-dessus...

->Mon javascript ne marche pas sous firefox mais sous IE 6.0 oui :

Tout rentre dans la nbase de données sauf le input du javascript ('id_rnature') (et le masque de date ne fnioctionne pas)

Pourquoi s'il vous plait??

Un grand merci si vous prenez le temps de m'aidez (enfin de me sauver)

<script language="JavaScript">

var noChange=1;

function SubmitForm()
{
if(document.Form_update.Libelle.value.length < 1 ||document.Form_update.Ractif.value.length < 1)
{
alert('Formulaire Incomplet !');
}
else
{
document.Form_update.submit();
}
}
List = new Array();

function Remplir(valeur){
var sel="";

noChange=0;
sel ="<select name='Rnature' style=\"FONT-SIZE: xx-small; COLOR: #000000; width: 200px;\"";
// Parcourir le tableau
for (var i=0;i<List.length;i++)
{
// tester si la ligne du tableau (Sous-catégorie) correspond à la valeur de la catéhorie
if (List[i][1]==valeur)
{
// Ajouter une rubrique sous-catégorie au variable SEL
if (List[i][0]==<?php echo $qGet['id_rnature']?>)
{
sel= sel +"<option value="+List[i][0]+" SELECTED>"+List[i][2]+"</option>";
globale=List[i][0];
}
else
{
sel= sel +"<option value="+List[i][0]+">"+List[i][2]+"</option>";
globale=List[i][0];
}
}
}
sel =sel + "</select>";

// Modifier le DIV scat par la nouvelle List à partir du variable SEL
document.getElementById('scat').innerHTML=sel;
}

Puis dans le HTML :

<div id="scat"><?php
// $qNature="Select rnature.id, `idadefinir`, rnature.libelle from `rnature` left join `ractif` on ractif.id=rnature.idadefinir order by rnature.id" or die(mysql_error());
$qNature="Select * from `rnature`" or die(mysql_error());
$resultrnature = mysql_query($qNature);
$i=0;

/* while ($sty = mysql_fetch_array($resultrnature))
{
print "<option value=".$qGetactif['id'];
print ">".$qGetactif['libelle']."</option>";
if($i==0){$j=$qGetactif['id'];// $i=1;}
}*/

while ($sty = mysql_fetch_array ($resultrnature, MYSQL_ASSOC))
{

echo "<script language=\"Javascript\">List[$i] = new Array('".$sty['id']."','".$sty['type']."','".$sty['libelle']."');</script>";
$i=$i+1;
}

?>
<script language="JavaScript">
if(noChange==1){Remplir(<?php echo $qGet['id_ractif'];?>);}
</script>
</div><div id="scat"><?php
// $qNature="Select rnature.id, `idadefinir`, rnature.libelle from `rnature` left join `ractif` on ractif.id=rnature.idadefinir order by rnature.id" or die(mysql_error());
$qNature="Select * from `rnature`" or die(mysql_error());
$resultrnature = mysql_query($qNature);
$i=0;

/* while ($sty = mysql_fetch_array($resultrnature))
{
print "<option value=".$qGetactif['id'];
print ">".$qGetactif['libelle']."</option>";
if($i==0){$j=$qGetactif['id'];// $i=1;}
}*/

while ($sty = mysql_fetch_array ($resultrnature, MYSQL_ASSOC))
{

echo "<script language=\"Javascript\">List[$i] = new Array('".$sty['id']."','".$sty['type']."','".$sty['libelle']."');</script>";
$i=$i+1;
}

?>
<script language="JavaScript">
if(noChange==1){Remplir(<?php echo $qGet['id_ractif'];?>);}
</script>
</div>

Puis pour terminer ce rogntudjuuu de formulaire :

<input onClick='SubmitForm()' type="button" name="Submit" value="Ok" style="FONT-SIZE: xx-small; background-color:<?php print $colorbt;?>; COLOR: <?php print $colorbttx;?>; width: 45px; height: 20px"></td>
</tr>

<script language="JavaScript">
/*function RedrawForm(test, test2)
{
if(test)
{
test2.style.display = 'none';
test.style.display = 'Block';
}

}
function InitForm()
{
if(Form_update.Image_old.value != ''){
Image_old.style.display = 'block';
Image_new.style.display = 'none';
}
else{
Image_old.style.display = 'none';
Image_new.style.display = 'block';
}
if(Form_update.Fichier_old.value != ''){
Fichier_old.style.display = 'block';
Fichier_new.style.display = 'none';
}
else{
Fichier_old.style.display = 'none';
Fichier_new.style.display = 'block';
}

}

document.onload = InitForm();

*/
oDate1Mask = new Mask("dd/mm/yyyy", "date");
oDate1Mask.attach(document.Form_update.Dexpiration);
</script>

Encore merci de votre patience et de votre aide.

Configuration: Windows XP
Internet Explorer 6.0

Meilleures réponses pour « input Javascript IE 6.0 ok / Firefox3 non... » dans :
[Webmaster] Afficher des PNG transparents dans IE 5.5 et IE 6 VoirLe problème Les PNG transparents permettent de faire de très beaux effets sur les pages web. Tous les navigateurs le supportent (Firefox, Opera, Konqueror, Safari, Camino...)... sauf Internet Explorer 5.5 et 6 ! (Internet Explorer 7, lui,...
Télécharger Visual Basic 6 Runtime (VB6 DLL) VoirLe Runtime Visual Basic 6 contient l'ensemble des librairies (DLL) nécessaires pour exécuter des programmes écrits en langage Visual Basic 6.0. Il contient notamment les DLL suivantes :...

1

 Javascript, le 28 aoû 2008 à 12:36:09

J'autoprécise que cela marche parfaitement sous IE 6.0 mais PAS sous FF3!!

Répondre à Javascript