Window.open et target = self ouvrir meme page

Résolu/Fermé
marmotte08 Messages postés 42 Date d'inscription mercredi 14 mai 2008 Statut Membre Dernière intervention 8 mars 2010 - 27 mai 2008 à 14:38
Marco la baraque Messages postés 996 Date d'inscription vendredi 9 mai 2008 Statut Contributeur Dernière intervention 5 novembre 2009 - 27 mai 2008 à 20:23
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 ^^
A voir également:

1 réponse

Marco la baraque Messages postés 996 Date d'inscription vendredi 9 mai 2008 Statut Contributeur Dernière intervention 5 novembre 2009 328
27 mai 2008 à 20:23
Bonsoir !
window.open('social.html','_self');
...


Bonne continuation.
3