Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
3116 connectés 

 


Dernière réponse
Sujet : javascript: pop up
antibillou Voici une fonction JavaScript qui te permet de le faire.
 
wloc --> ton lien (ex: "popup.html" )
sWidth_i --> largeur
sHeight_i --> hauteur
 
function openPopupWindow (wloc, sWidth_i, sHeight_i) {
  if (wAddEvent!=null) if (!wAddEvent.closed) {
     wAddEvent.focus();
     return;
  }
  var x=parseInt((screen.availWidth-sWidth_i)/2)
  var y=parseInt((screen.availHeight-sHeight_i)/2)
  wAddEvent = window.open(wloc,'wAddEvent','toolbar=no,locati
on=no,resizable=no,directories=no,status=no,person
al=no,menubar=no,scrollbars=yes,width='+sWidth_i+
',height='+sHeight_i+',left='+x+',top='+y);

 

 wAddEvent.moveTo(x,y);
}


Votre réponse
Nom d'utilisateur    Pour poster, vous devez être inscrit sur ce forum .... si ce n'est pas le cas, cliquez ici !
Le ton de votre message                        
                       
Votre réponse


[b][i][u][strike][spoiler][fixed][cpp][url][email][img][*]   
 
   [quote]
 

Options

 
Vous avez perdu votre mot de passe ?


Vue Rapide de la discussion
antibillou Voici une fonction JavaScript qui te permet de le faire.
 
wloc --> ton lien (ex: "popup.html" )
sWidth_i --> largeur
sHeight_i --> hauteur
 
function openPopupWindow (wloc, sWidth_i, sHeight_i) {
  if (wAddEvent!=null) if (!wAddEvent.closed) {
     wAddEvent.focus();
     return;
  }
  var x=parseInt((screen.availWidth-sWidth_i)/2)
  var y=parseInt((screen.availHeight-sHeight_i)/2)
  wAddEvent = window.open(wloc,'wAddEvent','toolbar=no,locati
on=no,resizable=no,directories=no,status=no,person
al=no,menubar=no,scrollbars=yes,width='+sWidth_i+
',height='+sHeight_i+',left='+x+',top='+y);

 

 wAddEvent.moveTo(x,y);
}

_naoua J'aimerais savoir s'il y avait qqn qui pourrait me dire comment ouvrir un pop up.
 
quelle est la bonne syntaxe pour qu'il passe sous tous les navigateurs??
 
j'aimerais l'ouvrir gràce à un lien, et j'aimerais mettre l'ouverture du pop up dans une fonction...
voila...
Merci d'avance...

Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)