no save
Assistance
Achat
News

Forum | programmation
window.open et target = self ouvrir meme page
marmotte08, le mar. 27 mai 2008 à 14:38:55
Bonjour,

je suis actuellement en train de faire un site internet et je souhaitai integrer un moteur de recherche interne apres avoir cherche durant 2 jours toutes les solutions que j'ai pu trouver ne fonctionnai pas alors j'ai opté pour une methode a ma facon avec "case". Cela marche tres bien avec ce systeme et mon moteur de recherche interne marche a merveille MAIS je souhaite que les pages s ouvrent dans le meme onglet(meme page) mais comme je l'ai ecri ci dessou ca ne marche pas

function rechercher() {
var recherche= document.formulaire.recherche.value;
switch(recherche)
{
case'social':window.open('social.html',target="_self");break;
case'travail':window.open('social.html',target="_self");break;
case'administration':window.open('social.html',target="_self");break;
case'famille':window.open('social.html',target="_self");break;
case'logement':window.open('social.html',target="_self");break;
case'budget':window.open('social.html',target="_self");break;
case'endettement':window.open('social.html',target="_self");break;
case'santé':window.open('social.html',target="_self");break;
case'maladie':window.open('social.html',target="_self");break;
case'handicap':window.open('social.html',target="_self");break;

default:window.alert('d\èsol\é aucun mot ne correspond a votre recherche');
}
}


savez vous ou je me suis trompé et ce que je peux faire?


merci d'avance j'espere ne pas en demandé trop ^^Configuration: Windows XP
Firefox 2.0.0.8
Version Web
Réalisé par RedShift
no save