problème avec l'ouverture de deux Iframes avec un lien

problème avec l'ouverture de deux Iframes avec un lien - HTML/CSS - Programmation

Marsh Posté le 16-02-2008 à 23:07:55    

Bonjour tout le monde !
 
alors déjà, je sais, beaucoup pensent que les iframe, c'est nul... mais j'aimerais vraiment utilisé ça pour mon site
J'ai fait des recherches google, et j'ai trouvé pas mal de tuto et code java pour ouvrir deux pages dans deux iframe différentes avec un seul lien... mais je ne sais pas pourquoi je n'arrive pas à le faire marcher sur mon site...  
 
voici un des codes que j'ai trouvé
 
<!DOCTYPE html PUBLIC "-//W3C//DTD html 4.01 Transitional//EN">  
<html>  
<head>  
<title>two frame test</title>  
<script>  
function twoFrameChange(nav,content){  
top.iframe1.location.href = nav;  
top.iframe2.location.href = content;  
}  
</script>  
</head>  
<body>  
<iframe name="iframe1" src="http://www.yahoo.com" target="_top"></iframe>  
<iframe name="iframe2" src="http://www.google.com"></iframe>  
<br>  
<br>  
<a href="javascript:twoFrameChange('www.google.com','http://www.alltheweb.com');">link1</a>  
</body>  
</html>  
 
 
donc, je l'ai testé, il marche... Maintenant avec ma modif :
 
<html>
 
<head>
<meta http-equiv="Content-Language" content="fr">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Marie's Uncles - Official Website</title>
<script>  
function twoFrameChange(nav,content){  
top.textframe.location.href = nav;  
top.menuframe.location.href = content;  
}  
</script>  
</head>
 
<body bgcolor="#000000">
<div style="background-color:FFFFFF; position: absolute; width: 510px; height: 495px; z-index: 5; left: 50%; margin-left:-160px; top: 300px" id="text">
   <iframe id="textframe" name="textframe" src="groupe.htm" target="_top" scrolling="auto"  
 width="510" height="495" scrolling="auto" frameborder="0" class="style1" id="textframe">
</iframe>
 
 
</div>
 
<div style="background-color:FFFFFF; position: absolute; width: 150px; height: 495px; z-index: 4; left: 50%; margin-left: -350px; top: 300px" id="menu1">
   <iframe id="iframe" name="menuframe" src="groupe_menu.htm" scrolling="auto"  
 width="150" height="495" scrolling="auto" frameborder="0" class="style1" id="menuframe">
</iframe></div>
 
<p><font color="#FFFFFF"><a href="javascript:twoFrameChange('bio_menu.html','bio.html');">link1</a> </font></p>
</body>
 
</html>
 
 
 
 
il me met "impossible d'afficher la page".... donc ca doit etre un probleme avec mes "bio_menu.html"... j'ai essayé .htm aussi (je ne sais pas si ça change quelque chose, j'ai bien vérifié, les pages sont dans le bon dossier.... bref là je suis perdu... est ce que quelqu'un aurait une idée du pourquoi ça ne marche pas????  
 
merci beaucoup d'avance !
 

Reply

Marsh Posté le 16-02-2008 à 23:07:55   

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed