IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JavaScript Discussion :

equivalent de document.getElementById("").value dans firefox


Sujet :

JavaScript

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    69
    Détails du profil
    Informations personnelles :
    Localisation : Tunisie

    Informations forums :
    Inscription : Avril 2008
    Messages : 69
    Par défaut equivalent de document.getElementById("").value dans firefox
    Salut tous le monde,

    Mon application tourne bien avec IE mais lorsque je la test sous FireFox elle fonctionne pas.
    il s'agit que FF ne reconnait pas .value dans "document.getElementById(""LIST_INDEXS_"+count)"
    y'a til un équivalent pour récupérer cette valeur
    Merci Bien

  2. #2
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Par défaut
    Salut
    "document.getElementById(""LIST_INDEXS_"+count)"
    document.getElementById est supporté par FF, on peut voir ton code complet?

  3. #3
    Rédacteur/Modérateur

    Avatar de SpaceFrog
    Homme Profil pro
    Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Inscrit en
    Mars 2002
    Messages
    39 659
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 75
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 659
    Billets dans le blog
    1
    Par défaut
    FFx reconnait parfaitement le getElemnetById ...

    à mon avis le souci est ailleurs ...
    on peut voir du code ?
    Ma page Developpez - Mon Blog Developpez
    Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
    Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
    Votre post est résolu ? Alors n'oubliez pas le Tag

    Venez sur le Chat de Développez !

  4. #4
    Rédacteur/Modérateur

    Avatar de SpaceFrog
    Homme Profil pro
    Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Inscrit en
    Mars 2002
    Messages
    39 659
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 75
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 659
    Billets dans le blog
    1
    Par défaut
    ce ne serait pas un textarea par hasard? modifie en innerhtml ,
    Ma page Developpez - Mon Blog Developpez
    Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
    Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
    Votre post est résolu ? Alors n'oubliez pas le Tag

    Venez sur le Chat de Développez !

  5. #5
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    69
    Détails du profil
    Informations personnelles :
    Localisation : Tunisie

    Informations forums :
    Inscription : Avril 2008
    Messages : 69
    Par défaut
    je sais bien quel marche sous FF, mais il reconnait pas .value
    je veu récupérer une valeur d'une liste
    .innerHTML m'affiche toute le résultat mais g besoin d'un seul élément
    Merci

  6. #6
    Rédacteur

    Avatar de Bovino
    Homme Profil pro
    Développeur Web
    Inscrit en
    Juin 2008
    Messages
    23 647
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2008
    Messages : 23 647
    Billets dans le blog
    20
    Par défaut
    Si, Firefox reconnait value pour les éléments ayant une propriété value.
    Maintenant, si tu nous montrais ton code et la partie du html concernée, ça aiderait grandement à te répondre précisément !
    Pas de question technique par MP !
    Tout le monde peut participer à developpez.com, vous avez une idée, contactez-moi !
    Mes formations video2brain : La formation complète sur JavaScriptJavaScript et le DOM par la pratiquePHP 5 et MySQL : les fondamentaux
    Mon livre sur jQuery
    Module Firefox / Chrome d'intégration de JSFiddle et CodePen sur le forum

  7. #7
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2008
    Messages
    69
    Détails du profil
    Informations personnelles :
    Localisation : Tunisie

    Informations forums :
    Inscription : Avril 2008
    Messages : 69
    Par défaut
    code JS :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    ///////////////////////////////////////
    function getCritere(count)
    			{
     
    				//MODIF MNB MZ modifier ".value par .innerHTML"
    				var strBool = document.getElementById("SEL_OPERATION_"+count).value 	
    						alert("strBool  "+strBool)
    				var strOperation = document.getElementById("SEL_CONDITIONS_"+count).value
    					alert("strOperation  "+strOperation)
    				var strForm = document.getElementById("FORMS_"+count).value
    					alert("strForm  "+strForm)
    				var nom = navigator.appName; 
    				alert("nom nav :"+nom)
    				if(nom=='Microsoft Internet Explorer')
    				{
    				var strSelectedIndexe = document.getElementById("LIST_INDEXS_"+count).value;
    				alert("111111111111111 strSelectedIndexe---> LIST_INDEXS_"+count+"---"+strSelectedIndexe)
    				}
    				if(nom=='Netscape')
    				{
    					var strSelectedIndexe = document.getElementById("LIST_INDEXS_"+count).value;
    					alert("111111111111111 strSelectedIndexe---> LIST_INDEXS_"+count+"---"+strSelectedIndexe)
    				}
    				var strTypeIndex = strSelectedIndexe.split("¤")[1];
    				alert("strTypeIndex 999999999999999999 "+strTypeIndex)
    				if((strTypeIndex=='DATE')||(strTypeIndex=='NUM'))
    				{
    					strOperation = document.getElementById("SEL_CONDITIONS_DATE_"+count).value
    					alert("000000000 --->strOperation --"+strOperation) 
     
    				} 
     
    				strSelectedIndexe = strSelectedIndexe.split("¤")[0];
    				alert("apre innerHTML 0000000000---->"+strSelectedIndexe)
    ....................
     
     
    ////////
    strNewCriterSearch += "<td nowrap=\"\">"  
    				strNewCriterSearch += "<select id=\"LIST_INDEXS_"+compteurOfCriter+"\" class=\"STYLE_TEXT_INPUT\" onchange=\"InitChampsToSearch("+compteurOfCriter+", 'YES');\">" 
    				strNewCriterSearch += "<option value=\"\"></option>"
    				strNewCriterSearch += "</select>"
    				strNewCriterSearch += "<span id=\"LIBELLE_INDEX_"+compteurOfCriter+"\" class=\"SIMPLE_TEXT_OVER\"></span>" 
    				strNewCriterSearch += "</td>"							
     
    				strNewCriterSearch += "<td>"
    				strNewCriterSearch += "<select id=\"SEL_CONDITIONS_"+compteurOfCriter+"\" class=\"STYLE_TEXT_INPUT\" style=\"display:none\">"
    				strNewCriterSearch += "<option value=\"EXACT\">"+strLibelleEXACT+"</option>"
    				strNewCriterSearch += "<option value=\"UN_DES_MOTS\">"+strLibelleUN_DES_MOTS+"</option>"
    				strNewCriterSearch += "<option value=\"TOUS_LES_MOTS\">"+strLibelleTOUS_LES_MOTS+"</option>"
    				strNewCriterSearch += "</select>"
     
    				strNewCriterSearch += "<select id=\"SEL_CONDITIONS_DATE_"+compteurOfCriter+"\" class=\"STYLE_TEXT_INPUT\" style=\"display:none\" onchange=\"AffichIntervalDate("+compteurOfCriter+")\">"
    				strNewCriterSearch += "<option value=\"EXACT\">"+strLibelleEXACTDATE+"</option>"
    				strNewCriterSearch += "<option value=\"LT\"><</option>"
    				strNewCriterSearch += "<option value=\"LTE\"><=</option>"
    				strNewCriterSearch += "<option value=\"GT\">></option>"
    				strNewCriterSearch += "<option value=\"GTE\">>=</option>"
    				strNewCriterSearch += "<option value=\"INTERVAL\">[ ]</option>"
    				strNewCriterSearch += "</select>"				
    				strNewCriterSearch += "</td>"
     
    				strNewCriterSearch += "<td>"
    				strNewCriterSearch += "<select id=\"SEL_DERIV_"+compteurOfCriter+"\" class=\"STYLE_TEXT_INPUT\" style=\"display:none\">"
    				strNewCriterSearch += "<option value=\"NO\">"+strLibelleNO+"</option>"
    				strNewCriterSearch += "<option value=\"YES\">"+strLibelleYES+"</option>"				
    				strNewCriterSearch += "</select>"
    				strNewCriterSearch += "</td>"
     
    				strNewCriterSearch += "<td>"
    				strNewCriterSearch += "<select id=\"FORMS_"+compteurOfCriter+"\" class=\"STYLE_TEXT_INPUT\" style=\"display:none\">"		
    				strNewCriterSearch += "</select>"								
    				strNewCriterSearch += "</td>"
     
    				strNewCriterSearch += "<td><table cellSpacing=\"2\" cellPadding=\"0\" border=\"0\" valign=\"top\"><tr>"
     
    				strNewCriterSearch += "<td>"
    				strNewCriterSearch += "<input id=\"LIST_INPUT_"+compteurOfCriter+"\" style=\"display:none\"/>"
    				strNewCriterSearch += "</td>"
     
    				strNewCriterSearch += "<td>"
    				strNewCriterSearch += "<input id=\"INPUT_OF_ALL_SEARCH_"+compteurOfCriter+"\" class=\"STYLE_TEXT_INPUT\" style=\"display:none\"/>"  
    				strNewCriterSearch += "</td>"
     
    				strNewCriterSearch += "<td>"
    				strNewCriterSearch += "<input id=\"LIBELLE_LINK_INPUT_OF_ALL_SEARCH_"+compteurOfCriter+"\" class=\"STYLE_TEXT_INPUT\" style=\"display:none\"/>"  
    				strNewCriterSearch += "</td>"
     
    				strNewCriterSearch += "<td>"
    				strNewCriterSearch += "<input id=\"INPUT_OF_SCD_DATE_SEARCH_"+compteurOfCriter+"\" class=\"STYLE_TEXT_INPUT\" style=\"display:none\"/>"
    				strNewCriterSearch += "</td>"
     
    				strNewCriterSearch += "<td>"
    				strNewCriterSearch += "<select id=\"SELECT_OF_ALL_SEARCH_"+compteurOfCriter+"\" class=\"STYLE_TEXT_INPUT\" style=\"display:none\" onchange=\"document.getElementById('INPUT_OF_ALL_SEARCH_"+compteurOfCriter+"').value=this.value;\">"
    				strNewCriterSearch += "</select>" 
    				strNewCriterSearch += "</td>"
     
    				strNewCriterSearch += "<td>"
     
    				//modif taha 02-06-2008
    				strNewCriterSearch += "<img id=\"IMGLINK_"+compteurOfCriter+"\" src=\""+JSPath2Images+"GENERAL/BUTTONS/select-all.gif\" alt=\""+g_strLibelleLangueCourante+"\" style=\"display:none;cursor:pointer\" onclick=\"ViewPopup("+compteurOfCriter+");\"/>"
    				strNewCriterSearch += "</td>"
    				//fin modif taha 02-06-2008
     
    				strNewCriterSearch += "<td>"
    				strNewCriterSearch += "<img id=\"IMGDETAIL_"+compteurOfCriter+"\" src=\""+JSPath2Images+"GENERAL/BUTTONS/display-detailed-list.gif\" alt=\"Voir le formulaire en détail\" style=\"display:none;cursor:pointer\" onclick=\"ViewDetailGrille("+compteurOfCriter+")\"/>"
    				strNewCriterSearch += "</td>"
     
    				strNewCriterSearch += "</tr></table></td>"
     
     
     
    				strNewCriterSearch += "<td width=\"100%\" bgcolor=\"white\"> </td>"  
    				strNewCriterSearch += "</tr>"
    ////////////////////////////////

Discussions similaires

  1. document.getElementById('livre').value retourne undefined!
    Par sara21 dans le forum Général JavaScript
    Réponses: 1
    Dernier message: 24/05/2007, 14h08
  2. [vbnet 1.1]Inserer deux simple quote sans texte dans une db
    Par ChristopheOce dans le forum Windows Forms
    Réponses: 8
    Dernier message: 15/03/2007, 08h51
  3. [Fonction] Quote et guillemet dans un textarea
    Par ddelec24 dans le forum PHP & Base de données
    Réponses: 2
    Dernier message: 11/03/2007, 15h51
  4. Réponses: 2
    Dernier message: 07/01/2007, 12h22
  5. This.value au lieu de document.getElementById('field').value
    Par yoyot dans le forum Général JavaScript
    Réponses: 4
    Dernier message: 04/03/2005, 14h02

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo