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 :

Script imparfait sous IE7


Sujet :

JavaScript

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    227
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 227
    Par défaut Script imparfait sous IE7
    Bonsoir à tous,

    D'avance excusez moi si je ne suis pas dans la bonne rubrique ou si ma question est mal formulée.
    La programmation n'est pas du tout mon domaine...
    Je vous expose donc mon problème en espérant vous présenter tous ce qui pourra vous aider à analyser mon problème.
    Faute de quoi, je fournirais ce qui vous intéresse.

    J'ai installé sur mon forum un script et un MOD qui permette d'afficher une image que on passe la souris sur un mot.
    SI le mot est souligné sur FireFox, il ne l'est pas sous IE7...
    Est-ce du au JAvascript ou pas?
    Si oui, voici les codes:
    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
     
     
    Le script infobulle.js:
    var xOffset=6
    var yOffset=5    
     
    var affiche = false; // La variable i nous dit si le bloc est visible ou non
    var w3c=document.getElementById && !document.all;
    var ie=document.all;
     
    if (ie||w3c) {
      var laBulle
    }
     
    function ietruebody(){  // retourne le bon corps...
      return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
    }
     
    function deplacer(e) {
      if(affiche){
        var curX = (w3c) ? e.pageX : event.x + ietruebody().scrollLeft;
        var curY = (w3c) ? e.pageY : event.y + ietruebody().scrollTop;
     
        var winwidth = ie && !window.opera ? ietruebody().clientWidth : window.innerWidth - 20;
        var winheight = ie && !window.opera ? ietruebody().clientHeight : window.innerHeight - 20;
     
        var rightedge = ie && !window.opera ? winwidth - event.clientX - xOffset : winwidth - e.clientX - xOffset;
        var bottomedge = ie && !window.opera ? winheight - event.clientY - yOffset : winheight - e.clientY - yOffset;
     
        var leftedge = (xOffset < 0) ? xOffset*(-1) : -1000
     
        // modifier la largeur de l'objet s'il est trop grand...
        if(laBulle.offsetWidth > winwidth / 3){
          laBulle.style.width = winwidth / 3
        }
     
        // si la largeur horizontale n'est pas assez grande pour l'info bulle
        if(rightedge < laBulle.offsetWidth){
          // bouge la position horizontale de sa largeur à gauche
          laBulle.style.left = curX - laBulle.offsetWidth + "px"
        } else {
          if(curX < leftedge){
            laBulle.style.left = "5px"
          } else{
            // la position horizontale de la souris
            laBulle.style.left = curX + xOffset + "px"
          }
        }
     
        // même chose avec la verticale
        if(bottomedge < laBulle.offsetHeight){
          laBulle.style.top = curY - laBulle.offsetHeight - yOffset + "px"
        } else {
          laBulle.style.top = curY + yOffset + "px"
        }
      }
    }
    function montre(text) {
      if (w3c||ie){
        laBulle = document.all ? document.all["bulle"] : document.getElementById ? document.getElementById("bulle") : ""
        laBulle.innerHTML = text; // fixe le texte dans l'infobulle
        laBulle.style.visibility = "visible"; // Si il est cachée (la verif n'est qu'une securité) on le rend visible.
        affiche = true;
      }
    }
    function cache() {
      if (w3c||ie){
        affiche = false
        laBulle.style.visibility="hidden" // avoid the IE6 cache optimisation with hidden blocks
        laBulle.style.top = '-1000px'
        laBulle.style.backgroundColor = ''
        laBulle.style.width = ''
      }
    }
     
    document.onmousemove = deplacer; // des que la souris bouge, on appelle la fonction move pour mettre a jour la position de la bulle.
    Merci pour votre aide

    Marco

  2. #2
    Expert confirmé
    Avatar de Auteur
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    7 660
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 7 660
    Par défaut
    bonjour,

    A priori ça ne vient pas du script, donne le code de ta page, ou un lien vers celle-ci

    -------------
    Si tu utilises des balises de lien (balise <a href="#">) pour afficher tes infos-bulles, tu peux également rechercher de ce côté là (car tes liens sont soulignés sous FF mais pas sous IE)

    Plusieurs possibilités :
    1. regarde la feuille de style de ta page. As-tu un code du genre :
      Code css : Sélectionner tout - Visualiser dans une fenêtre à part
      1
      2
      3
      a{
      text-decoration: none;
      }
      si oui remplace "none" par "underline"
    2. Ou c'est peut-être une option d'IE qui est désactivée.

      Outils > Options Internet
      Dans la boite de dialogue clique sur l'onglet avancées.

      Cherche l'item "Navigation" puis "Souligner les liens". Tu as 3 options :
      • jamais
      • par pointage
      • toujours

      coche "toujours"

  3. #3
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    227
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 227
    Par défaut
    Merci pour la réponse rapide.
    Bon c'est pas du javascript, je suis pas au bon endroit, je vais encore me faire engueuler...


    Voici le lien vers ma page.
    http://forum.couteauxzen.net/viewtopic.php?t=2094
    Les parametres IE7 sont bons, je suis sur "toujours"

    Marco

  4. #4
    Expert confirmé
    Avatar de Auteur
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    7 660
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 7 660
    Par défaut
    dans le code source c'est la balise acronym qui est utilisée, par exemple :
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <acronym onmouseover="montre('<img src=\'http://www.couteauxzen.net/webcz/bddimages/1515.jpg\' />')" onmouseout="cache();" title="">1515</acronym>

    Le lien est souligné grâce à ce style :
    Code css : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    border-bottom-style: dotted; /*pointillés */
    or IE ne reconnait pas ce style

    J'ai regardé la feuille de styles inclue dans la page, et j'ai vu ce style nulle part.
    Peut-être dans une feuille de style externe ?

  5. #5
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    227
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 227
    Par défaut
    Super...
    On approche on dirait!


    J'ai du merdouiller quelque part parce que j'ai 2 fichiers css si c'est cela que tu appelles les feuilles de sytle.
    un subsilver.css et un subSilver.css

    Je pense que ce doit être les même.
    Je te copie le code de la subsilver.css:
    J'espère avoir bien compris ce que tu veux...

    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
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
     
    /*
      The original subSilver Theme for phpBB version 2+
      Created by subBlue design
      http://www.subBlue.com
    */
     
     
     /* General page style. The scroll bar colours only visible in IE5.5+ */
    body {
    	background-color: #E5E5E5;
    	scrollbar-face-color: #DEE3E7;
    	scrollbar-highlight-color: #FFFFFF;
    	scrollbar-shadow-color: #DEE3E7;
    	scrollbar-3dlight-color: #D1D7DC;
    	scrollbar-arrow-color:  #006699;
    	scrollbar-track-color: #EFEFEF;
    	scrollbar-darkshadow-color: #98AAB1;
    }
     
    /* General font families for common tags */
    font,th,td,p { font-family: Verdana, Arial, Helvetica, sans-serif }
    a:link,a:active,a:visited { color : #006699; }
    a:hover		{ text-decoration: underline; color : #DD6900; }
    hr	{ height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}
     
     
    /* This is the border line & background colour round the entire page */
    .bodyline	{ background-color: #FFFFFF; border: 1px #98AAB1 solid; }
     
    /* This is the outline round the main forum tables */
    .forumline	{ background-color: #FFFFFF; border: 2px #006699 solid; }
     
     
    /* Main table cell colours and backgrounds */
    td.row1	{ background-color: #EFEFEF; }
    td.row2	{ background-color: #DEE3E7; }
    td.row3	{ background-color: #D1D7DC; }
     
     
    /*
      This is for the table cell above the Topics, Post & Last posts on the index.php page
      By default this is the fading out gradiated silver background.
      However, you could replace this with a bitmap specific for each forum
    */
    td.rowpic {
    		background-color: #FFFFFF;
    		background-image: url(images/cellpic2.jpg);
    		background-repeat: repeat-y;
    }
     
    /* Header cells - the blue and silver gradient backgrounds */
    th	{
    	color: #FFA34F; font-size: 11px; font-weight : bold;
    	background-color: #006699; height: 25px;
    	background-image: url(images/cellpic3.gif);
    }
     
    td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {
    			background-image: url(images/cellpic1.gif);
    			background-color:#D1D7DC; border: #FFFFFF; border-style: solid; height: 28px;
    }
     
     
    /*
      Setting additional nice inner borders for the main table cells.
      The names indicate which sides the border will be on.
      Don't worry if you don't understand this, just ignore it :-)
    */
    td.cat,td.catHead,td.catBottom {
    	height: 29px;
    	border-width: 0px 0px 0px 0px;
    }
    th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR {
    	font-weight: bold; border: #FFFFFF; border-style: solid; height: 28px; }
    td.row3Right,td.spaceRow {
    	background-color: #D1D7DC; border: #FFFFFF; border-style: solid; }
     
    th.thHead,td.catHead { font-size: 12px; border-width: 1px 1px 0px 1px; }
    th.thSides,td.catSides,td.spaceRow	 { border-width: 0px 1px 0px 1px; }
    th.thRight,td.catRight,td.row3Right	 { border-width: 0px 1px 0px 0px; }
    th.thLeft,td.catLeft	  { border-width: 0px 0px 0px 1px; }
    th.thBottom,td.catBottom  { border-width: 0px 1px 1px 1px; }
    th.thTop	 { border-width: 1px 0px 0px 0px; }
    th.thCornerL { border-width: 1px 0px 0px 1px; }
    th.thCornerR { border-width: 1px 1px 0px 0px; }
     
     
    /* The largest text used in the index page title and toptic title etc. */
    .maintitle,h1,h2	{
    			font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif;
    			text-decoration: none; line-height : 120%; color : #000000;
    }
     
     
    /* General text */
    .gen { font-size : 12px; }
    .genmed { font-size : 11px; }
    .gensmall { font-size : 10px; }
    .gen,.genmed,.gensmall { color : #000000; }
    a.gen,a.genmed,a.gensmall { color: #006699; text-decoration: none; }
    a.gen:hover,a.genmed:hover,a.gensmall:hover	{ color: #DD6900; text-decoration: underline; }
     
     
    /* The register, login, search etc links at the top of the page */
    .mainmenu		{ font-size : 11px; color : #000000 }
    a.mainmenu		{ text-decoration: none; color : #006699;  }
    a.mainmenu:hover{ text-decoration: underline; color : #DD6900; }
     
     
    /* Forum category titles */
    .cattitle		{ font-weight: bold; font-size: 12px ; letter-spacing: 1px; color : #006699}
    a.cattitle		{ text-decoration: none; color : #006699; }
    a.cattitle:hover{ text-decoration: underline; }
     
     
    /* Forum title: Text and link to the forums used in: index.php */
    .forumlink		{ font-weight: bold; font-size: 12px; color : #006699; }
    a.forumlink 	{ text-decoration: none; color : #006699; }
    a.forumlink:hover{ text-decoration: underline; color : #DD6900; }
     
     
    /* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */
    .nav			{ font-weight: bold; font-size: 11px; color : #000000;}
    a.nav			{ text-decoration: none; color : #006699; }
    a.nav:hover		{ text-decoration: underline; }
     
     
    /* titles for the topics: could specify viewed link colour too */
    .topictitle			{ font-weight: bold; font-size: 11px; color : #000000; }
    a.topictitle:link   { text-decoration: none; color : #006699; }
    a.topictitle:visited { text-decoration: none; color : #5493B4; }
    a.topictitle:hover	{ text-decoration: underline; color : #DD6900; }
     
     
    /* Name of poster in viewmsg.php and viewtopic.php and other places */
    .name			{ font-size : 11px; color : #000000;}
     
    /* Location, number of posts, post date etc */
    .postdetails		{ font-size : 10px; color : #000000; }
     
     
    /* The content of the posts (body of text) */
    .postbody { font-size : 12px;}
    a.postlink:link	{ text-decoration: none; color : #006699 }
    a.postlink:visited { text-decoration: none; color : #5493B4; }
    a.postlink:hover { text-decoration: underline; color : #DD6900}
     
     
    /* Quote & Code blocks */
    .code {
    	font-family: Courier, 'Courier New', sans-serif; font-size: 11px; color: #006600;
    	background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
    	border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
    }
     
    .quote {
    	font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #444444; line-height: 125%;
    	background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
    	border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
    }
     
     
    /* Copyright and bottom info */
    .copyright		{ font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #444444; letter-spacing: -1px;}
    a.copyright		{ color: #444444; text-decoration: none;}
    a.copyright:hover { color: #000000; text-decoration: underline;}
     
     
    /* Form elements */
    input,textarea, select {
    	color : #000000;
    	font: normal 11px Verdana, Arial, Helvetica, sans-serif;
    	border-color : #000000;
    }
     
    /* The text input fields background colour */
    input.post, textarea.post, select {
    	background-color : #FFFFFF;
    }
     
    input { text-indent : 2px; }
     
    /* The buttons used for bbCode styling in message post */
    input.button {
    	background-color : #EFEFEF;
    	color : #000000;
    	font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif;
    }
     
    /* The main submit button option */
    input.mainoption {
    	background-color : #FAFAFA;
    	font-weight : bold;
    }
     
    /* None-bold submit button */
    input.liteoption {
    	background-color : #FAFAFA;
    	font-weight : normal;
    }
     
    /* This is the line in the posting page which shows the rollover
      help line. This is actually a text box, but if set to be the same
      colour as the background no one will know ;)
    */
    .helpline { background-color: #DEE3E7; border-style: none; }
     
     
    /* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
    @import url("formIE.css");

  6. #6
    Expert confirmé
    Avatar de Auteur
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    7 660
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 7 660
    Par défaut
    Citation Envoyé par idamarco
    J'ai du merdouiller quelque part parce que j'ai 2 fichiers css si c'est cela que tu appelles les feuilles de sytle.
    un subsilver.css et un subSilver.css
    ce sont effectivement les feuilles de styles (Cascading Style Sheets)


    Citation Envoyé par idamarco
    Je te copie le code de la subsilver.css:
    ce n'est pas la bonne

    Fais une recherche par mots-clefs dans tes fichiers CSS : "acronym" ou mieux "dotted".

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 1
    Dernier message: 16/11/2010, 14h25
  2. Mon script pour compter les caractères marche sous IE7 et non IE8
    Par Alexandrebox dans le forum Général JavaScript
    Réponses: 5
    Dernier message: 29/06/2009, 14h42
  3. Script marche sous IE7 mais pas sous FF
    Par raffa dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 27/10/2008, 11h54
  4. Script qui ne fonctionne pas sous IE7
    Par carbaba dans le forum Général JavaScript
    Réponses: 3
    Dernier message: 23/01/2008, 22h50

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