Bonjour
je cherche à mettre à jour une iframe avec du javascript.
ça marche sous ie mais pas sous firefox (pour une fois...)
voici le code de ma page principale:
et voici mon 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 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script language='JavaScript' type='text/javascript' src='script.js'></script> </script> </head> <body onload="test()"> <iframe id="plop" name="plop" src="http://www.google.fr"></iframe> </body> </html>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 function test(){ var myf = document.getElementById("plop"); myf.document.body.innerHTML="plop"; }
J'ai passé la matinée à chercher sur google et ses copains et je trouve pas... toutes les solutions proposées testés se sont avérés innutiles. alors je me résoud à poster.
merci d'avance à celui qui me sortira en 3 secondes la réponse que j'ai cherché pendant 4h en vein ^^
Partager