Bonjour
Voilà, j'ai trouvé un codes de
sbertho dans les tutos pour faire une redirection quand on apelle en dirct une page d'un site qui doit apparaitre dans un frame.
Il fonctionne bien sauf qu'il met dans la barre d'adresse une adresse du genre http://www.monsite.com/index.html?http://www.monsite.com/news.html.
et en faisant cela il empêche les autres script de fonctionner.
Voici le script en question
if (parent.frames.length==0)
{
var url = window.location.href;
var sbch = url.indexOf("/",7)
var domaineok=0;
var sbch2= 0;
var domaine=url.substring(7,url.indexOf("/",7));
var Chaine="";
if (domaine=="www.didiereusebe-organisation.com") {domaineok=1;domaine="http://www.didiereusebe-organisation.com";}
else {domaine="";}
while (sbch>1)
{
sbch2 = url.indexOf("/",sbch+1);
if (sbch2>0)
{
Chainetmp = url.substring(sbch+1,sbch2);
if (Chainetmp=="aleph2at.free.fr") {domaineok=1;}
else {if (domaineok==1) {Chaine = Chaine + "/" + Chainetmp;}}
}
else {Chaine = Chaine + "/" + url.substring(sbch+1,9999);}
sbch = url.indexOf("/",sbch+1);
}
window.location.replace(domaine+'/index.html?'+domaine+Chaine);;
}
function clear(text) {while (text.search(/%20/) != -1) text = text.replace(/%20/," ");text = text.replace(/%E9/,"é");return text;}
function ReFrame()
{
var param=window.top.location.search;
if (param!=0)
{
window.parent.main.location.href = clear(param.substr(1,param.length));
}
}
Si vous pouviez m'aider je vous en serais reconnaissant
Merci à tous