begin process at 2010 03 22 15:23:29
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Effets

 > DOUBLE MESSAGE DANS LA BARRE D'ETAT

DOUBLE MESSAGE DANS LA BARRE D'ETAT


 Information sur la source

Note :
9 / 10 - par 2 personnes
9,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :Effets Niveau :Débutant Date de création :25/11/2003 Vu :3 823

Auteur : michel77

Ecrire un message privé
Site perso
Commentaire sur cette source (3)
Ajouter un commentaire et/ou une note

 Description

message moin agressif dans une barre de tache. c'est un ami qui me la fait j'en profite pour vous le donner. je pense qu'il est libre de droit. Si bug faite le moi savoir bonne journée à tous ;-)

Source

  • <html>
  • <head>
  • <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  • <title>ESSAI</title>
  • </head>
  • <SCRIPT LANGUAGE="JavaScript">
  • <!--
  • // set speed of banner (pause in milliseconds between characters)
  • var speed = 120
  • // decrease value to increase speed (must be positive)
  • // set pause between completion of message and beginning of following message
  • var pause = 120 // increase value to increase pause
  • // set initial values
  • var timerID = null
  • var bannerRunning = false
  • // create global array
  • var ar = new Array()
  • // assign the strings to the array's elements
  • ar[0] = "votre texte"
  • ar[1] = "votre deuxieme texte "
  • // set index of first message to be displayed first
  • var currentMessage = 0
  • // set index of last character to be displayed first
  • var offset = 0
  • // stop the banner if it is currently running
  • function stopBanner() {
  • // if banner is currently running
  • if (bannerRunning)
  • // stop the banner
  • clearTimeout(timerID)
  • // timer is now stopped
  • bannerRunning = false
  • }
  • // start the banner
  • function StartPage() {
  • // make sure the banner is stopped
  • stopBanner()
  • // start the banner from the current position
  • showBanner()
  • }
  • // type-in the current message
  • function showBanner() {
  • // assign current message to variable
  • var text = ar[currentMessage]
  • // if current message has not finished being displayed
  • if (offset < text.length) {
  • // if last character of current message is a space
  • if (text.charAt(offset) == " ")
  • // skip the current character
  • offset++
  • // assign the up-to-date to-be-displayed substring
  • // second argument of method accepts index of last character plus one
  • var partialMessage = text.substring(0, offset + 1)
  • // display partial message in status bar
  • window.status = partialMessage
  • // increment index of last character to be displayed
  • offset++ // IE sometimes has trouble with "++offset"
  • // recursive call after specified time
  • timerID = setTimeout("showBanner()", speed)
  • // banner is running
  • bannerRunning = true
  • } else {
  • // reset offset
  • offset = 0
  • // increment subscript (index) of current message
  • currentMessage++
  • // if subscript of current message is out of range
  • if (currentMessage == ar.length)
  • // wrap around (start from beginning)
  • currentMessage = 0
  • // recursive call after specified time
  • timerID = setTimeout("showBanner()", pause)
  • // banner is running
  • bannerRunning = true
  • }
  • }
  • // -->
  • </SCRIPT>
  • <body topmargin="0" leftmargin="0" onLoad="StartPage();">
  • </body>
  • </html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>ESSAI</title>
</head>
<SCRIPT LANGUAGE="JavaScript">
<!--
// set speed of banner (pause in milliseconds between characters)
var speed = 120
// decrease value to increase speed (must be positive)
// set pause between completion of message and beginning of following message
var pause = 120 // increase value to increase pause
// set initial values
var timerID = null
var bannerRunning = false
// create global array
var ar = new Array()
// assign the strings to the array's elements
ar[0] = "votre texte"
ar[1] = "votre deuxieme texte   "
// set index of first message to be displayed first
var currentMessage = 0
// set index of last character to be displayed first
var offset = 0
// stop the banner if it is currently running
function stopBanner() {
   // if banner is currently running
   if (bannerRunning)
       // stop the banner
       clearTimeout(timerID)
   // timer is now stopped
   bannerRunning = false
}
// start the banner
function StartPage() {
   // make sure the banner is stopped
   stopBanner()
   // start the banner from the current position
   showBanner()
}
// type-in the current message
function showBanner() {
   // assign current message to variable
   var text = ar[currentMessage]
   // if current message has not finished being displayed
   if (offset < text.length) {
       // if last character of current message is a space
       if (text.charAt(offset) == " ")
           // skip the current character
           offset++            
       // assign the up-to-date to-be-displayed substring
       // second argument of method accepts index of last character plus one
       var partialMessage = text.substring(0, offset + 1) 
       // display partial message in status bar
       window.status = partialMessage
       // increment index of last character to be displayed
       offset++ // IE sometimes has trouble with "++offset"
       // recursive call after specified time
       timerID = setTimeout("showBanner()", speed)
       // banner is running
       bannerRunning = true
   } else {
       // reset offset
       offset = 0
       // increment subscript (index) of current message
       currentMessage++
       // if subscript of current message is out of range
       if (currentMessage == ar.length)
           // wrap around (start from beginning)
           currentMessage = 0
       // recursive call after specified time
       timerID = setTimeout("showBanner()", pause)
       // banner is running
       bannerRunning = true
   }
}
// -->
</SCRIPT>
<body topmargin="0" leftmargin="0" onLoad="StartPage();">
</body>
</html>



 Sources du même auteur

Source avec une capture CALENDRIER QUI TOURNE AVEC L'HEURE ET SUIT LA SOURIS,

 Sources de la même categorie

AFFICHER OU CACHER UN COMPOSANT AVEC JAVASCRIPT V1.0 par xloadx
Source avec Zip MOOLOUPE - EFFET DE LOUPE VIA LE FRAMEWORK MOOTOOLS par Miky76
Source avec Zip MOOTOOLTIP par Miky76
Source avec Zip Source avec une capture PAINTPIX (VERSION TESTE. EXPORTATION IMAGE POUR SITE WEB) par sitajony
FONCTION BLINK ( TESTÉE SOUS FF ) PORTABILITÉ IE OP ET GC EN... par xloadx

Commentaires et avis

Commentaire de linkinpar236737 le 26/11/2003 13:14:36

Ce n'est pas mal du tout, dommage que les explications soient en anglais...

Commentaire de SeBb ChRiSt le 11/12/2004 22:21:27

Trés bonne source ! c'est trés bien
Merci
a+

Commentaire de operrin le 08/05/2005 08:33:59


Tres tres bon,mais comme souvent avec Firefox ca ne marche pas

 Ajouter un commentaire




Nos sponsors


Appels d'offres

Sondage...

Comparez les prix

CalendriCode

Mars 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728
293031    

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,827 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales