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

  FORUM HardWare.fr
  Programmation
  HTML/CSS

  Lien pop up

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Lien pop up

n°2065384
Famicom
Posté le 22-03-2011 à 23:03:23  profilanswer
 

Bonjour à tous,
 
 
Je cherche à mettre les liens de cette partie du script en pop-up sans taille prédéfini et ajustable par l'utilisateur.
 

Code :
  1. url = new makeArray(4);
  2. url[1]="http://harris-tooth.pagesperso-orange.fr/diapositive/pagemusique1.html";
  3. url[2]="http://harris-tooth.pagesperso-orange.fr/diapositive/pagemusique2.html";
  4. url[3]="http://harris-tooth.pagesperso-orange.fr/diapositive/pagemusique3.html";
  5. url[4]="http://harris-tooth.pagesperso-orange.fr/diapositive/pagemusique4.html";


 
 
Le code complet :
 
 

Code :
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4.   <meta content="text/html; charset=ISO-8859-1"
  5. http-equiv="content-type">
  6.   <title></title>
  7. <head>
  8. <script typee="text/javascript">
  9. function makeArray(n) {
  10. this.length = n;
  11. for (var i=1; i<=n; i++) {
  12. this[i] = "";
  13. }
  14. return this;
  15. }
  16. var i; //lwf  
  17. function imagealeatoire() {
  18. i = Math.floor(4 * Math.random() + 1);
  19. return "<a href='"+url[i]+"'><img src='"+image[i]+"' width='200' height='200' border='0' /></a>";
  20. }
  21. image = new makeArray(4);
  22. image[1]="image1.png";
  23. image[2]="image2.png";
  24. image[3]="image3.png";
  25. image[4]="image4.png";
  26. url = new makeArray(4);
  27. url[1]="http://harris-tooth.pagesperso-orange.fr/diapositive/pagemusique1.html";
  28. url[2]="http://harris-tooth.pagesperso-orange.fr/diapositive/pagemusique2.html";
  29. url[3]="http://harris-tooth.pagesperso-orange.fr/diapositive/pagemusique3.html";
  30. url[4]="http://harris-tooth.pagesperso-orange.fr/diapositive/pagemusique4.html";
  31. // Stop hiding from old browsers -->  
  32. </script>
  33. </head>
  34. <body style="color: rgb(00, 00, 00); background-color: rgb(00, 00, 00);">
  35. <div id="Layer1" style="position:absolute; left:1px; top:1px; width:200px; height:200px; z-index:45; visibility: inherit; text-align:center;">
  36. <div onmouseover=this.stop() onmouseout=this.start() scrollAmount=1 scrollDelay=60 direction=up width=200 height=200 background="#000000">
  37. <script type="text/javascript">document.write(imagealeatoire());</script>
  38. </div></div>
  39. </body>
  40. </html>

 
 
 
Je sais qu'il doit y avoir une histoire de window.open mais je ne sais absolument pas ou le placer  :cry:  
 
 
Merci à tous ceux qui peuvent m'apporter leur aide  :)


Message édité par Famicom le 22-03-2011 à 23:08:55
mood
Publicité
Posté le 22-03-2011 à 23:03:23  profilanswer
 

n°2065447
olivthill
Posté le 23-03-2011 à 10:55:52  profilanswer
 

L'astuce consiste à ajouter :
 
TARGET="_blank"
 
dans la ligne du href
 
Pour une discussion sur href et window.open, voir http://webtips.dan.info/new-window.html .

n°2065468
Famicom
Posté le 23-03-2011 à 11:21:31  profilanswer
 

Merci beaucoup olivthill !  
 
j'y vais desuite http://harris-tooth.pagesperso-orange.fr/mcrsmiley/okay.gif


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  HTML/CSS

  Lien pop up

 

Sujets relatifs
Création d'un lien HTML vers un fichier localdéplacer anciens fichiers en laissant lien symbolique
lien api windows en langage CSouci lien sous firefox
problème vignette+lien / site full flash[PHP] Insérer un array dans un lien hypertexte
Lien automatique sur URL valideLien automatique en fonctione de mots
Publication de ma vidéo avec player FVL (lien sur une image)Slide show : changer un lien href en meme temps que l'image affichée
Plus de sujets relatifs à : Lien pop up


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