Communauté Informatique NDFR.net : Redirection d'une page avec frame - Programmation Web (HTML, PHP, ASP, Java, XML, etc.)
 
Redirection d'une page avec frame
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 23-11-2003, 20:09
Benjy's Avatar
Benjy Benjy is offline
Administrateur
 
Join Date: 21-08-2001
Location: Rueil Malmaison (92)
Age: 44
Posts: 2,043
Send a message via MSN to Benjy
Re: Redirection d'une page avec frame

Code source de http://divafaye.free.fr/fr/news/index.htm :
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Le site en français de Faye Wong, Diva de la pop Chinoise !</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="faye,wong,officiel,official,french,france,francais,english,american,chinese,reference,site,website,fayenatics,forum,afaye,lajabor,wongfei,bestfaye,graman,fayefans,fei,wan,xia,liu,jingwen,shirley,queen,diva,fans,chinoise,hong,kong,china,chine,asie,asia,singer,chanteuse,pop,cantopop,asianpop,pictures,photos,images,galeries,biographie,profile,downloads,telechargements,songs,chansons,music,musique,mp3,discographie,albums,movies,films,filmographie,2046,chinese,odyssey,2002,okinawa,clips,videos,wallpapers,fonds,ecran,skins,winamp,links,liens,final,fantasy,soundtrack,BO,FF7,FF8,FF9,FF10,eyes,on,me">
<meta name="description" content="Faye Wong, Chinese pop Diva Website : loads of informations for english and chinese Fayenatics.Faye Wong, Diva de la pop Chinoise : site de reference pour les fayenatics français, anglais et chinois">
<script type="text/javascript" src="framekill.js"></script>
<script type="text/javascript" src="frameset.js"></script>
</head>
<frameset rows="*" frameborder="NO" border="0" framespacing="0">
  <frameset cols="167,*" frameborder="NO" border="0" framespacing="0">
  <frame src="gauche.php" name="leftFrame" scrolling="no">
  <frameset onLoad="LoadFrame(); return true" rows="125,*" frameborder="NO" border="0" framespacing="0">
	<frame src="haut.php" name="topFrame" scrolling="no" noresize marginwidth="0" marginheight="15" target="_self">
	<frame name="mainFrame" scrolling="auto" src="news.php" target="_self">
  </frameset>
 </frameset>
</frameset>
<noframes><body>
</body></noframes>
</html>
A mettre dans le <head></head> de http://divafaye.free.fr/fr/news/news.php (et évidemment des autres pages allant dans la frame mainFrame) :
Code:
<script type="text/javascript" src="frameset.js">
Code source de framekill.js :
Code:
<!--
// Free the index/default.htm with Browsercheck for IE5.x
if ((navigator.appName.indexOf('Microsoft') != -1)&&(parseInt(navigator.appVersion.indexOf('5.')) != -1)&&(self != top)) {
 parent.location.href = self.location.href;
}
// Set frameset-status to "loaded", replace URL if needed
var FramesetLoaded = 1;
function LoadFrame() {
  if(self.location.search.length > 0) {
   var lengthens = self.location.search.length;
   var NewUrl = self.location.search.substring(1,lengthens);
   if (document.images)
	self.mainFrame.location.replace(NewUrl);
   else
	self.mainFrame.location.href = (NewUrl);
  }
}
//-->
Code source de frameset.js :
Code:
<!--
// Replace URL if frameset-variable != 1 or does not exist
var TargetFile = "index.html?"+location.pathname;
if (!top.FramesetLoaded) {
 if (document.images)
  top.location.replace(TargetFile);
 else
  top.location.href = TargetFile;
}
//-->
__________________
Merci de lire et de respecter les règles et d'utiliser la .
Reply With Quote
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cours de français Benjy Discussions sur le site et/ou le forum 47 01-05-2006 14:47
Petit prob de mis en page avec mysql ! bastien Programmation Web (HTML, PHP, ASP, Java, XML, etc.) 5 21-06-2004 14:40
Comparatif des gestionnaires de téléchargement Kaspof Articles 106 27-02-2004 15:03
Premiers pas sous Linux Fred Articles 19 21-10-2003 05:46
Lancer un exe à partir d'une page HTML madmax Programmation Web (HTML, PHP, ASP, Java, XML, etc.) 9 15-01-2003 13:08

All times are GMT +2. The time now is 00:03.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.