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 :

wysiwyg invisible dans ie7


Sujet :

JavaScript

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé Avatar de zugolin
    Homme Profil pro
    Inscrit en
    Octobre 2007
    Messages
    275
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Octobre 2007
    Messages : 275
    Par défaut wysiwyg invisible dans ie7
    bonjour a tous,
    vous avez donc compris mon probleme avec le titre...
    j'ai téléchargé ce wysiwyg ici
    http://www.vulgarisation-informatiqu...wysiwyg-js.php
    (si vous en avez besoin, le mien est plus simple, donc, a vous de choisir ....)
    mais pour les 2 versions, l'affichage ne se fait pas avec ie7 (ie6, je ne sais pas..)

    voici donc mon js joint (je pense que le probleme vient de là)
    j'ai ajouté une partie au debut du code (sur un autre wysi qui fonctionne)
    en pensant que ça aller resoudre, mais , non !
    ahhhhh... au fait, je suis un peu une bille en js

    je met le code complet, au cas ou ...
    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
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
     
    function Wysiwyg(id, objectId) {
    /*ajout */
    var isIE;
    var isGecko;
    var isSafari;
    var isKonqueror;
    function initwysi() {
    	var ua = navigator.userAgent.toLowerCase();
    	isIE = ((ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1));
    	isGecko = (ua.indexOf("gecko") != -1);
    	isSafari = (ua.indexOf("safari") != -1);
    	isKonqueror = (ua.indexOf("konqueror") != -1);
     
    }
     
    /*FIN-------------------------ajout */
     
        if (!id || !objectId) { 
    		alert('Wysiwyg.constructor(id, objectId) erreur, deux arguments sont requis'); 
    		return;
    	}
     
        var self = this;
     
        this.id = id;
        this.objectId = objectId;
        this.frame;
        this.height = '500px'; // Height in px
        this.width = '700px'; // Width in px
        this.viewSource = false;
        this.path = ''; // Path whith slash at the end
        this.cssFile = '';
        this.charset = 'iso-8859-1';
        this.editorHtml = '';
        this.frameHtml = '';
        this.textareaValue = '';
     
        this.browser = {
            'ie': Boolean(document.body.currentStyle),
            'gecko' : (navigator.userAgent.toLowerCase().indexOf('gecko') != -1)
        };
     
        this.init = function() {
            if (document.getElementById && document.createElement && document.designMode && (this.browser.ie || this.browser.gecko)) {
                // EDITOR
                if (!document.getElementById(this.id)) { 
    				alert('Wysiwyg ' + this.objectId + ' . init() erreur, l\'element "' + this.id + '" n\'existe pas'); 
    				return; 
    			}
                this.textareaValue = document.getElementById(this.id).value;
                var wysiwyg = document.createElement('div');
     
                document.getElementById(this.id).parentNode.replaceChild(wysiwyg, document.getElementById(this.id));
                wysiwyg.id = this.id + '-wysiwyg';
                wysiwyg.innerHTML = this.editorHtml ? this.editorHtml : this.getEditorHtml();
                // BUTTONS
                var buttons = wysiwyg.getElementsByTagName('td');
                for (var i = 0; i < buttons.length; ++i) {
                    if (buttons[i].className == 'button') {
                        buttons[i].id = this.id + '-button-' + i;
                        buttons[i].onmouseover = function() { 
    												this.className = 'button-hover'; 
    											}
                        buttons[i].onmouseout = function() { 
    												this.className = this.className.replace(/button-hover(\s)?/, 'button'); 
    											}
                        buttons[i].onclick = function(id) { 
    											return function() { 
    												this.className = 'button-hover button-click'; 
    												setTimeout(
    													function() { 
    														document.getElementById(id).className = document.getElementById(id).className.replace(/(\s)?button-click/, ''); 
    													}, 100); 
    											} 
    										} 
    					(buttons[i].id);
    			   }	
                }
                // FRAME
                if (this.browser.ie) 
                    this.frame = frames[this.id + '-frame'];
                else if (this.browser.gecko)
                    this.frame = document.getElementById(this.id + '-frame').contentWindow;
     
                this.frame.document.designMode = 'on';
                this.frame.document.open();
                this.frame.document.write(this.frameHtml ? this.frameHtml : this.getFrameHtml());
                this.frame.document.close();
                insertHtmlFromTextarea();
            }
        };
     
        function lockUrls(s) {
            if (self.browser.gecko) { 
    			return s; 
    		}
            return s.replace(/href=["']([^"']*)["']/g, 'href="wysiwyg://wysiwyg/$1"');
        }
     
        function unlockUrls(s) {
            if (self.browser.gecko) { 
    			return s; 
    		}
            return s.replace(/href=["']wysiwyg:\/\/wysiwyg\/([^"']*)["']/g, 'href="$1"');
        }
     
        function insertHtmlFromTextarea() {
            try { 
    			self.frame.document.body.innerHTML = lockUrls(self.textareaValue); 
    		} 
    		catch (e) { 
    			setTimeout(insertHtmlFromTextarea, 10); 
    		}
        }
    	function AjouterLien(href,texte,target) /*HS*/
    						{
    							lien = document.createElement("A");
    							lien.setAttribute("href",href);
    							lien.setAttribute("target",target);
    							lien.innerHTML =texte;
    							document.body.appendChild(lien);
    						}
        this.getEditorHtml = function() {
            var html = '';
            html += '<input type="hidden" id="' + this.id + '" name="' + this.id + '" value="">';
    		html += '<table class="wysiwyg" cellspacing="0" cellpadding="0" height=' + this.height + ' width="' + this.width + '">';
    		html += '  <tr>';
    		html += '  	<td>';
    		html += '	 <table class="bar" id="' + this.id + '-buttons" cellspacing="0" cellpadding="0" align="center">';
    		html += '	   <tr>';
    		html += '	   	<td>';
    		html += '		<table cellspacing="0" cellpadding="0" align="center">';
    		html += '  		  <tr>';
    		html += '   	   <td class="button"><img src="' + this.path + 'imageswysi/undo.gif" width="18" height="18" alt="Annuler" title="Annuler" onclick="' + this.objectId + '.execCommand(\'Undo\')"></td>';
    		html += '   	   <td class="button"><img src="' + this.path + 'imageswysi/redo.gif" width="18" height="18" alt="Refaire" title="Refaire" onclick="' + this.objectId + '.execCommand(\'Redo\')"></td>';
            html += '    	   <td><div class="separator"></div></td>';
            html += '    	   <td class="button"><img src="' + this.path + 'imageswysi/link.gif" width="18" height="18" alt="Hyperlien" title="Hyperlien" onclick="' + this.objectId + '.execCommand(\'CreateLink\')"></td>';
            html += '    	   <td class="button"><img src="' + this.path + 'imageswysi/mail.gif" width="18" height="18" alt="Mailto" title="Mailto" onclick="' + this.objectId + '.execCommand(\'Mail\')"></td>';
            html += '    	   <td><div class="separator"></div></td>';
    	    html += '    	   <td class="button"><img src="' + this.path + 'imageswysi/image.gif" width="18" height="18" alt="Image" title="Image" onclick="' + this.objectId + '.execCommand(\'InsertImage\')"></td>';
            html += '    	   <td><div class="separator"></div></td>';
    			    html += '    	   <td class="button"><img src="' + this.path + 'imageswysi/image-c.gif" width="18" height="18" alt="Image" title="Image cliquable" onclick="' + this.objectId + '.execCommand(\'InsertImage2\')"></td>';
            html += '    	   <td><div class="separator"></div></td>';
            html += '    	   <td class="button"><img src="' + this.path + 'imageswysi/erase.gif" width="18" height="18" alt="Aucune mise en forme" title="Aucune mise en forme" onclick="' + this.objectId + '.execCommand(\'RemoveFormat\')"></td>';
            html += '    	   <td><div class="separator"></div></td>';
    		html += '  		  </tr>';
    		html += '		</table>';
    		html += '	   	</td>';
    		html += '	   	<td>';
    		html += '		<table cellspacing="0" cellpadding="0" align="center">';
    		html += '  		  <tr>';
    		html += '   	   <td class="button"><img src="' + this.path + 'imageswysi/bold.gif" width="18" height="18" alt="Gras" title="Gras" onclick="' + this.objectId + '.execCommand(\'Bold\')"></td>';
            html += '   	   <td class="button"><img src="' + this.path + 'imageswysi/italic.gif" width="18" height="18" alt="Italique" title="Italique" onclick="' + this.objectId + '.execCommand(\'Italic\')"></td>';
            html += '   	   <td><div class="separator"></div></td>';
            html += '   	   <td class="button"><img src="' + this.path + 'imageswysi/left.gif" width="18" height="18" alt="Aligner à gauche" title="Aligner à gauche" onclick="' + this.objectId + '.execCommand(\'JustifyLeft\')"></td>';
            html += '   	   <td class="button"><img src="' + this.path + 'imageswysi/center.gif" width="18" height="18" alt="Centrer" title="Centrer" onclick="' + this.objectId + '.execCommand(\'justifycenter\')"></td>';
            html += '   	   <td class="button"><img src="' + this.path + 'imageswysi/justify.gif" width="18" height="18" alt="Justifier" title="Justifier" onclick="' + this.objectId + '.execCommand(\'JustifyFull\')"></td>';
            html += '   	   <td><div class="separator"></div></td>';
            html += '    	   <td class="button"><img src="' + this.path + 'imageswysi/ul.gif" width="18" height="18" alt="Liste " title="Liste " onclick="' + this.objectId + '.execCommand(\'InsertUnorderedList\')"></td>';
            html += '    	   <td><div class="separator"></div></td>';
            html += '    	   <td class="button"><img src="' + this.path + 'imageswysi/indent.gif" width="18" height="18" alt="Retrait du texte" title="Retrait du texte" onclick="' + this.objectId + '.execCommand(\'Indent\')"></td>';
            html += '    	   <td><div class="separator"></div></td>';
            html += '    	   <td class="button"><img src="' + this.path + 'imageswysi/textcolor.gif" width="18" height="18" alt="Couleur du texte" title="Couleur du texte" onclick="' + this.objectId + '.execCommand(\'ForeColor\')"></td>';
            html += '    	   <td><div class="separator"></div></td>';
    		html += '  		  </tr>';
    		html += '		</table>';
    		html += '	   	</td>';
    		html += '	   	<td>';
    		html += '		<table cellspacing="0" cellpadding="0">';
    		html += '  		  <tr>';   	      	   
    		html += '    	   <td>';
    		html += '    	   <select onchange="' + this.objectId + '.execCommand(\'FontSize\', this.value);this.selectedIndex=0;">';
    		html += '    	    <option value="">Taille</option>';
    		html += '    	    <option value="1">1 (8 pt)</option>';
    		html += '    	    <option value="2">2 (10 pt)</option>';
    		html += '    	    <option value="3">3 (12 pt)</option>';
    		html += '    	    <option value="4">4 (14 pt)</option>';
    		html += '    	    <option value="5">5 (18 pt)</option>';
    		html += '    	    <option value="6">6 (24 pt)</option>';
    		html += '    	    <option value="7">7 (36 pt)</option>';
    		html += '    	   </select>';
    		html += '    	   </td>';
    		html += '    	   <td class="button"><img src="' + this.path + 'imageswysi/help.gif" width="18" height="18" alt="Help" title="Help" onclick="' + this.objectId + '.openWindow(\'' + this.path + 'aide.html\', \'600\', \'600\')"></td>';
    		html += '  		  </tr>';
    		html += '		</table>';
    		html += '	   	</td>';
    		html += '	   </tr>';
    		html += ' 	   <tr>';
    		html += '	  	<td>';
    		html += '		 <table cellspacing="0" cellpadding="0">';
    		html += '		   <tr>';
    		html += '		   </tr>';
    		html += '		 </table>';
    		html += '	  	</td>';
    		html += ' 	   </tr>';
    		html += '	 </table>';
    		html += '	</td>';
    		html += '  </tr>';
    		html += '  <tr>';
    		html += '	<td class="frame"><iframe id="' + this.id + '-frame" style="height:' + this.height + '; width:' + this.width + '"></iframe></td>';
    		html += '  </tr>';
            html += '  <tr>';
    		html += '   <td class="source"><input id="' + this.id + '-viewSource" type="checkbox" onclick="' + this.objectId + '.toggleSource()"> Source</td>';
    		html += '  </tr>';
            html += '</table>';
            return html;
        };
     
        this.getFrameHtml = function() {
            var html = '';
    		html += '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
    		html += '<html xmlns="http://www.w3.org/1999/xhtml">';
    		html += '<head>';
    		html += '<meta http-equiv="Content-Type" content="text/html; charset=' + this.charset + '" />';
    		html += '<title>Wysiwyg editor</title>';
    		if (this.cssFile) { 
    		html += '<link rel="stylesheet" type="text/css" href="' + this.cssFile + '">'; 
    		}
    		html += '<style type="text/css">';
    		html += 'html, body {'; 
    		html += '	cursor: text;'; 
    		html += '}';
    		html += 'body {';
    		html += '	margin: 0.5em; ';
    		html += '	padding: 0;';
    		html += '}';
    		html += '</style>';
    		html += '</head>';
    		html += '<body>';
    		html += '</body>';
    		html += '</html>';
            return html;
        };
     
     
     
        this.execCommand = function(cmd, value) {
    		try {
    			this.frame.focus();
    						if (cmd == 'CreateLink' && !value) {
    				var url = prompt('Entrer l\'URL du lien', 'http://');
    				if (url) {
    					this.frame.document.execCommand('Unlink', false, null);
    					if (this.browser.ie) 
    						this.frame.document.execCommand(cmd, false, 'wysiwyg://wysiwyg/' + url);
    					else if (this.browser.gecko) 
    						this.frame.document.execCommand(cmd, false, url);
    				}
    			} 
     
    			else if (cmd == 'Mail' && !value) {
    				var text = prompt('Texte : ', 'E-mail');
    				var mail = prompt('Adresse de Messagerie : ', 'xxxx@xxxx.xxx');
    				if(text && mail) {
    					self.frame.document.body.innerHTML += '<a href="mailto:' + mail + '">' + text + '</a>';
    				}
    			} 
    			else if (cmd == 'InsertImage' && !value) {
    				var imageUrl = prompt('Entrez le nom exacte de l\'image que vous avez préalablement envoyé ', '');
    				if (imageUrl) {
    					self.frame.document.body.innerHTML += '<img src="http://1client/images/images_base/' + imageUrl + '"/>';
    				}
    			} 
    			else if (cmd == 'InsertImage2' && !value) {
    				var imageUrl = prompt('Entrez le nom exacte de l\'image que vous avez préalablement envoyé )', '');
    				if (imageUrl) {
    					self.frame.document.body.innerHTML += '<a href="http://1client/images/images_base/'+ imageUrl + '" rel="lightbox[roadtrip]"><img src="http://1client/images/images_base/vignettes/' + imageUrl + '"   border="0"/></a>';
    				}
    			} 
    			else if (cmd == 'ForeColor' && !value) {
    				var ForeColor = prompt('Noir=black/Blanc=white/Marron=maroon/Gris=grey/Vert=green/Bleu=blue/Jaune=yellow/rouge=red/ETC...', 'couleur');
    				if (ForeColor) {
    					this.frame.document.execCommand(cmd, false, ForeColor);
    				}
    			} 
     
    			else {
    				this.frame.document.execCommand(cmd, false, value);
    			}
    			this.frame.focus();
    		}
    		catch(e) {
    			alert(e); 
    		}
        };
     
        this.openWindow = function(url, width, height) {
            var x = (screen.width/2-width/2);
            var y = (screen.height/2-height/2);
            window.open(url, '', 'scrollbars=yes, width=' + width + ', height=' + height + ', screenX=' + (x) + ', screenY=' + y + ', left=' + x + ', top=' + y);
        };
     
        this.toggleSource = function() {
            var html, text;
            if (this.browser.ie) {
                if (!this.viewSource) {
                    html = this.frame.document.body.innerHTML;
                    this.frame.document.body.innerText = unlockUrls(html);
                    document.getElementById(this.id + '-buttons').style.visibility = 'visible';
                    this.viewSource = true;
                } 
    			else {
                    text = this.frame.document.body.innerText;
                    this.frame.document.body.innerHTML = lockUrls(text);
                    document.getElementById(this.id + '-buttons').style.visibility = 'visible';
                    this.viewSource = false;
                }
            } 
    		else if (this.browser.gecko) {
                if (!this.viewSource) {
                    html = document.createTextNode(this.frame.document.body.innerHTML);
                    this.frame.document.body.innerHTML = '';
                    this.frame.document.body.appendChild(html);
                    document.getElementById(this.id + '-buttons').style.visibility = 'hidden';
                    this.viewSource = true;
                } 
    			else {
                    html = this.frame.document.body.ownerDocument.createRange();
                    html.selectNodeContents(this.frame.document.body);
                    this.frame.document.body.innerHTML = html.toString();
                    document.getElementById(this.id + '-buttons').style.visibility = 'visible';
                    this.viewSource = false;
                }
            }
            document.getElementById(this.id + '-viewSource').checked = this.viewSource ? 'checked' : '';
            document.getElementById(this.id + '-viewSource').blur();
        };
     
    	this.isOn = function() {
            return Boolean(this.frame);
        };
     
        this.getContent = function() {
            try { 
    			return unlockUrls(this.frame.document.body.innerHTML); 
    		} 
    		catch(e) {
    			alert(e); 
    		}
        };
     
        this.submit = function() {
            if (this.isOn()) {
                if (this.viewSource) 
    				this.toggleSource(); 
                document.getElementById(this.id).value = this.getContent();
            }
        };
    }
    et ensuite, la page :
    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
     
        <script type="text/javascript" src="Wysiwyg.js"></script>
        <link rel="stylesheet" type="text/css" href="Wysiwyg.css">
    <div align="center">
    <? 	
    ici du code php .....
     
     
    echo  '<form action="wysi.php?p='.$lenom.'&edition='.$edition.'" method="post">'; ?>
     
    	<p>
    		<textarea id="text" name="body" cols="60" rows="10">
    <? echo $assoc2['edition_'.$edition]; ?>
    		</textarea>
    	</p>
    	<p>
    		<input type="submit" value="Modifier" onclick="wysiwyg.submit();">
    	</p>
    </form>
    </div>
    <!-- A TTOUJOURS PLACER APRES LE FORMULAIRE -->
    <script language='JavaScript' type='text/javascript'>
    initwysi();
    </script>
    <script type="text/javascript">
    var wysiwyg = new Wysiwyg("text", "wysiwyg");
    wysiwyg.init();
    </script>
    nickel sur firefox, mais rien sur ie (a part mon bouton )
    merci d''avance pour votre aide

  2. #2
    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
    EN général ce genre de souci provient du fait que l'editeur wysiwyg utilise un iframe, ce qui peut sous IE poser un problème lorsque le doctype n'est pas approprié, par exemple si tu as un doctype strict.
    modifie le doctype poru autoriser l'iframe (transitional ou frameset, ou au pire pour les pages concernées en loose )
    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 !

  3. #3
    Membre éclairé Avatar de zugolin
    Homme Profil pro
    Inscrit en
    Octobre 2007
    Messages
    275
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Octobre 2007
    Messages : 275
    Par défaut
    ben, non, marche pas ....
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/transitional.dtd">
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    pareil pour du doctype XHTML ....
    il ne faut rien de special dans la balise <html> ?
    ça peut pas etre une histoire de compatibilité dans le js?

    (je remet le code de la page wysi, le js n'a pas changé)

    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
     
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/transitional.dtd">
    <html>
    <head>
    <title>Editeur</title>
     <script type="text/javascript" src="Wysiwyg.js"></script>
        <link rel="stylesheet" type="text/css" href="Wysiwyg.css">
    	</head>
    <body>
     
     
    <div align="center">
    <? 	
    code php ......
     
    echo  '<form action="wysi.php?p='.$lenom.'&edition='.$edition.'" method="post">'; ?>
     
    	<p>
    		<textarea id="text" name="body" cols="60" rows="10">
    <? echo $assoc2['edition_'.$edition]; ?>
    		</textarea>
    	</p>
    	<p>
    		<input type="submit" value="Modifier" onclick="wysiwyg.submit();">
    	</p>
    </form>
    </div>
    <!-- A TTOUJOURS PLACER APRES LE FORMULAIRE -->
    <script language='JavaScript' type='text/javascript'>
    initwysi();
    </script>
    <script type="text/javascript">
    var wysiwyg = new Wysiwyg("text", "wysiwyg");
    wysiwyg.init();
    </script>
    </body></html>

  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
    justement il faut eviter le strict !!

    essaye par exemple
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//FR" "http://www.w3.org/TR/html4/loose.dtd">
    ou
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
       "http://www.w3.org/TR/html4/frameset.dtd">
    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 éclairé Avatar de zugolin
    Homme Profil pro
    Inscrit en
    Octobre 2007
    Messages
    275
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Octobre 2007
    Messages : 275
    Par défaut
    pardon, j'avais fais un copié collé 2 fois de "strict"
    mais j'avais , en fait, essayé 3 méthodes:
    srict, transitionnal, et frameset
    non plus...
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
    "http://www.w3.org/TR/html4/frameset.dtd">
    meme avec "loose", pareil

  6. #6
    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
    alors change d'editeur wysiwyg, perso moi j'utilise FCKEditor qui tourne sans souci en crossbrowser ...
    il y a aussi TinyMCE que je n'ai pas retenu pour la lacune du module d'upload
    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 !

Discussions similaires

  1. Un de mes ordi est invisible dans le voisinnage réseau
    Par beegees dans le forum Administration
    Réponses: 3
    Dernier message: 10/12/2005, 13h34
  2. rectangles invisibles dans fireworks
    Par allowen dans le forum Autres langages pour le Web
    Réponses: 8
    Dernier message: 12/08/2005, 10h44
  3. [JList] [JScrollPane] JScrollPane invisible dans mon applet?
    Par Bobsinglar dans le forum Agents de placement/Fenêtres
    Réponses: 5
    Dernier message: 02/06/2005, 15h06
  4. explo de BD : zone de saisie SQL invisible dans
    Par sebitor dans le forum Bases de données
    Réponses: 2
    Dernier message: 23/03/2004, 17h39

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