Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > JavaScript
JavaScript Forum programmation JavaScript. Lire : Cours JavaScript, FAQ JavaScript, Toutes les FAQ JavaScript et Sources JavaScript
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 06/02/2011, 23h13   #1
Membre du Club
 
Inscription : juin 2007
Messages : 336
Détails du profil
Informations forums :
Inscription : juin 2007
Messages : 336
Points : 48
Points : 48
Par défaut Compatibilité sous IE7

Bonjour,
Je sèche sur un problème, j'ai un script javascript sur ma page index.php qui est chargé avec cette ligne de code :
Code :
<script type="text/javascript" src="js/javascript.js"></script>
Ce fichier javascript contient le code suivant :
Code :
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
// JavaScript Document
window.onunload = function(){
				GUnload();
			}
			window.onload = function(){
 
				if (GBrowserIsCompatible()) {
 
					// Init the map
					var map = new GMap2(document.getElementById('map'));
					map.addControl(new GSmallMapControl());
					map.setCenter(new GLatLng(48.856667, 2.350987), 12);
// Point 1				
					// Creating a marker
 
					var marker = new GMarker(new GLatLng(48.879906, 2.313697), {
							draggable: true, 
 
						});
 
					// Adding a click event to the marker
					GEvent.addListener(marker, "mouseover", function() {
					    marker.openInfoWindow('<table><tr><td><img src=http://www.toto.fr/toto.jpg width=60 height=54></td><td>blabla<br/>blabla<br/>blabla</br>blabla</td></tr></table>');
					});
 
					// Close InfoWindow at dragstart
					GEvent.addListener(marker, "dragstart", function() {
						map.closeInfoWindow();
					});
 
					// Add the marker to the map	
					map.addOverlay(marker);
// Point 2					
						// Creating a marker
					var marker2 = new GMarker(new GLatLng(48.852909, 2.336977), {
							draggable: true, 
 
						});
 
					// Adding a click event to the marker
					GEvent.addListener(marker2, "mouseover", function() {
					    marker2.openInfoWindow('<table><tr><td><img src=http://www.toto.fr/toto.jpg width=60 height=54></td><td>blabla<br/>blabla<br/>blabla</br>blablabla</td></tr></table>');
					});
 
					// Close InfoWindow at dragstart
					GEvent.addListener(marker2, "dragstart", function() {
						map.closeInfoWindow();
					});
 
					// Add the marker to the map	
					map.addOverlay(marker2);
// Point 3				
					// Creating a marker
 
					var marker3 = new GMarker(new GLatLng(48.874366, 2.322735), {
							draggable: true, 
 
						});
 
					// Adding a click event to the marker
					GEvent.addListener(marker3, "mouseover", function() {
					    marker3.openInfoWindow('<table><tr><td><img src=http://www.toto.fr/toto.jpg width=60 height=54></td><td>blabla<br/>blabla<br/>blabla</br>blabla</td></tr></table>');
					});
 
					// Close InfoWindow at dragstart
					GEvent.addListener(marker3, "dragstart", function() {
						map.closeInfoWindow();
					});
 
					// Add the marker to the map	
					map.addOverlay(marker3);					
				}
			}
Sa fonctionne sous firefox, mais pas sous IE7 et je ne sais pas pourquoi, .. donc si vous avez des idées je prends :-)
Big merci par avance !
yuyu599 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 07/02/2011, 11h48   #2
Expert Confirmé Sénior
 
Avatar de RomainVALERI
 
Homme Romain VALERI
POOête
Inscription : avril 2008
Messages : 2 572
Détails du profil
Informations personnelles :
Nom : Homme Romain VALERI
Âge : 35
Localisation : France, Meurthe et Moselle (Lorraine)

Informations professionnelles :
Activité : POOête

Informations forums :
Inscription : avril 2008
Messages : 2 572
Points : 4 073
Points : 4 073
Pour faire quoi exactement au moment de la fermeture de la page ?
__________________

...pour les linguistes et les curieux >>> générateur de phrases aléatoires

__________________
RomainVALERI est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 08h50.


 
 
 
 
Partenaires

Hébergement Web