1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| function chercheRemplace( text, stringToFind, stringRemplacement)
{
var text = text.toString() ;
var maReg = new RegExp( stringToFind, "gi") ;
var resultat = text.replace( maReg, stringRemplacement ) ;
if ( text.search( maReg ) == -1 )
return text;
else
return resultat ;
}
function refresh(ancre)
{
var uri = window.opener.location.href;
if (window.opener.location.hash != "" )
{
var uri = chercheRemplace( window.opener.location.href, window.opener.location.hash, '')
}
ur = uri + '#' + ancre;
window.opener.location.href=ur;
window.opener.location.reload();
window.close();
} |