Script html

Fermé
vincent - 12 juin 2010 à 11:33
avion-f16 Messages postés 19246 Date d'inscription dimanche 17 février 2008 Statut Contributeur Dernière intervention 21 avril 2024 - 12 juin 2010 à 12:44
Bonjour, a tous je voudrais savoir comment faire pour modifier mon script:

<script>
function chapichapo()
{
w1 = window.open("https://www.salesforce.com/products/platform/overview/" );
}
</script>
<body>
<a href="http://uneautrepagedemonsite" onclick="chapichapo();">clicquer ici</a>


je voudrais que la page site.com s'ouvre dans une fenetre mais qui vienne pas pertuber la visite de mes clients c'est a dire la page s'ouvre dans une autre fennetre qui se reduit

saviez vous comment faire ?
ou bien j'ai mal expliquer (désoler)!
A voir également:

3 réponses

avion-f16 Messages postés 19246 Date d'inscription dimanche 17 février 2008 Statut Contributeur Dernière intervention 21 avril 2024 4 497
12 juin 2010 à 11:38
Après window.open, fais un window.focus()
0
salut merci de me répondre mais je ne comprend pas trop comment ca marche

j'ai fait ca :

<script>
function chapichapo()
{
w1 = window.open windows.focus() ("http://le-site-d'un-ami.com" );
}
</script>
<body>
<a href="https://mon-site-a-moi.com/" onclick="chapichapo();">cliquer ici</a>

je ne sait pas ou mettre windows.focus().

je ne connais pas trop dans le language .
0
avion-f16 Messages postés 19246 Date d'inscription dimanche 17 février 2008 Statut Contributeur Dernière intervention 21 avril 2024 4 497
12 juin 2010 à 12:44
<script type="text/javascript">
var w1 = null;
 
function chapichapo() {
    w1 = window.open("http://le-site-d'un-ami.com");
    windows.focus()
}
</script>
<body>
<a href="https://mon-site-a-moi.com/" onclick="chapichapo();">cliquer ici</a>
0