begin process at 2012 05 30 04:51:50
  Trouver un code source :
 
dans
 
Accueil > Forum > 

Archive Javascript

 > 

Archives

 > 

AU SECOURS !!!

 > 

2 sources JScript


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

2 sources JScript

dimanche 20 février 2005 à 22:45:49 | 2 sources JScript

ProphetKy

Bonjour à tous,

Voila j'ai un petit probleme avec mes script JavaScript lorsque j'en met deux il y a en a qui disparait.  J'ai un Jscrip qui fait le menu et un autre qui fais un compte a rebour et le compte à rebour ne s'affiche pas mais si on retire le onload dans le tag body il s'affiche bien

voici le code source de la page

Merci d'avance


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="/themes/office_xp/office_xp.css" title="Office XP" />
<link rel=" alternate stylesheet" type="text/css" href="/themes/classic/classic.css" title="Classic" />


<script type="text/javascript" src="jsdomenu.js">

/***********************************************
* JSDOMenu v1.3- By Toh Zhiqiang (webmaster@REMOVETHIStohzhiqiang.per.sg)
* Script featured on Dynamic Drive DHTML code library
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

<script type="text/javascript" src="democonfig5.js"></script>

<script language="JavaScript1.2">

/*
Dynamic countdown Script- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS,
visit http://www.dynamicdrive.com
*/


function setcountdown(theyear,themonth,theday){
yr=theyear;mo=themonth;da=theday
}

//////////CONFIGURE THE COUNTDOWN SCRIPT HERE//////////////////

//STEP 1: Configure the countdown-to date, in the format year, month, day:
setcountdown(2005,04,15)

//STEP 2: Change the two text below to reflect the occasion, and message to display on that occasion, respectively
var occasion="eurobot 2005!"
var message_on_occasion="Et c est parti pour la compet!"

//STEP 3: Configure the below 5 variables to set the width, height, background color, and text style of the countdown area
var countdownwidth='480px'
var countdownheight='20px'
var countdownbgcolor= '#AABFFF'
var opentags='<B><font face="Verdana"><small>'
var closetags='</small></font></B>'

//////////DO NOT EDIT PASS THIS LINE//////////////////

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
var crosscount=''

function start_countdown(){
if (document.layers)
document.countdownnsmain.visibility="show"
else if (document.all||document.getElementById)
crosscount=document.getElementById&&!document.all?document.getElementById("countdownie") : countdownie
countdown()
}

if (document.all||document.getElementById)
document.write('<span id="countdownie" style="width:'+countdownwidth+'; background-color:'+countdownbgcolor+'"></span>')

window.onload=start_countdown


function countdown(){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todayh=today.getHours()
var todaymin=today.getMinutes()
var todaysec=today.getSeconds()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
futurestring=montharray[mo-1]+" "+da+", "+yr
dd=Date.parse(futurestring)-Date.parse(todaystring)
dday=Math.floor(dd/(60*60*1000*24)*1)
dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1)
dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1)
dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1)
//if on day of occasion
if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=1&&todayd==da){
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+message_on_occasion+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+message_on_occasion+closetags
return
}
//if passed day of occasion
else if (dday<=-1){
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+dday+ " jours, "+dhour+" heure, "+dmin+" minutes, and "+dsec+" secondes jusqu'a "+occasion+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+"Occasion already passed! "+closetags
return
}
//else, if not yet
else{
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+dday+ " jours, "+dhour+" heure, "+dmin+" minutes, and "+dsec+" secondes jusqu'a "+occasion+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+dday+ " jours, "+dhour+" heure, "+dmin+" minutes, and "+dsec+" secondes jusqu'a "+occasion+closetags
}
setTimeout("countdown()",1000)
}
</script>

</head>

<body bgcolor="white" text="black" onload="initjsDOMenu()">
<table width="100%" border="0" height="70%">
  <tr height="142">
    <td align="center" bgcolor="#aabfff" height="142">
      <div align="right">
        <table width="100%" border="0" height="100%" align="right">
          <tr height="104">
            <td align="left" width="77%" height="104">
                                    <table width="948" border="0" cellspacing="2" cellpadding="0" height="70%">
                                        <tr height="66%">
                                            <td width="19%" height="66%"><img src="images/rbt.jpg" height="138" width="122"></td>
                                            <th>
                                           
<ilayer id="countdownnsmain" width=&{countdownwidth}; height=&{countdownheight}; bgColor=&{countdownbgcolor}; visibility=hide><layer id="countdownnssub" width=&{countdownwidth}; height=&{countdownheight}; left=100 top=100></layer></ilayer>
                                            </th>
                                        </tr>
                                    </table>
                                </td>
            <td width="23%" height="104">
              <table width="100%" border="0" height="87">
                <tr bgcolor="white">
                                            <td align="center" valign="middle" bgcolor="white" width="51%" height="91">&nbsp;
                  <a href="http://www.helb-prigogine.be/fr/0101.php" target="_blank"><img src="images/helb.jpg"></a></td>
                                        </tr>
              </table>
            </td>
          </tr>
        </table>
      </div>
    </td>
  </tr>
  <tr height="664">
    <td valign="top" height="664">
      <table width="100%" border="0" height="437">
        <tr height="100%">
          <td bgcolor="#557faa" width="15%" height="100%">
            <table width="100%" border="0" height="437">
              <tr>
               <font color="#FFFFFF">
                <td width="35%" height="235">
                 
                 </td>
                </font>
              </tr>
              <tr>
                <td width="35%" height="49">&nbsp;</td>
              </tr>
              <tr>
                <td width="35%" height="137">
                  <table width="100%" border="0" height="145">
                    <tr>
                      <th height="30" width="100%" bordercolor="#FFFFCC">
                        <div align="center"><font color="#FFFFFF" size="2"><i>Les
                          statistiques</i></font></div>
                      </th>
                    </tr>
                    <tr>
                      <td height="99" width="100%"><font color="#FFFFFF"></font>
                      <% 'Response.Write(Application("visiteur")) %>
                      <!--- Code à insérer Ocount --->
                                            <script language="Javascript" src="http://www.ocount.com/client.php?bdd=34&id=3484&type=3&col1=000000&col2=aabfff&col3=FFFFFF&col4=557faa&col5=FFFFFF&cheat=0&use_cookie=0&show=yes&st=visiteur(s) sur le site">
                                            </script>
                                            <!---Fin du code Ocount --->
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
          <td valign="top" width="62%" height="100%" align="center">
            <%
                                         ' Const ForReading = 1, ForWriting = 2, ForAppending = 3
                                        '    Dim fs, f
                                        '    Set fs = CreateObject("Scripting.FileSystemObject")
                                           '    Set f = fs.OpenTextFile(Server.MapPath("pagearticles\") & "\" & request.QueryString("page") & ".asp", ForReading, TristateFalse)
                                        '    response.Write(f.readall)
                                        '    f.Close
                                            select case request.QueryString("page")
                                                case "accueil" : %> <!-- #include file="intro.asp" -->
                                                <% case "presse" : %> <!-- #include file="presse.asp" -->
                                                <% case "proinfo" : %> <!-- #include file="proinfo.asp" -->
                                                <% case "concours" : %> <!-- #include file="concours.asp" -->
                                                <% case "equipes" : %> <!-- #include file="equipes.asp" -->
                                                <% case "inscription" : %> <!-- #include file="intro.asp" -->
                                                <% case "confpanier" : %> <!-- #include file="intro.asp" -->
                                                <% case else %>
                                                <!-- #include file="intro.asp" -->
                                          <% end select %>
          </td>
          <td bgcolor="#557faa" width="23%" height="100%">
            <table width="100%" border="0" height="406">
              <tr height="25">
                <td align="center" height="25"><font color="white">!!&nbsp;</font> <font color="white">Venez nous voir  en direct !!</font> </td>
              </tr>
              <tr>
                <th height="32"><img src="images/camera.gif">
                                            <div align="center">
                                                <font size="2" color="white"></font></div>
                                        </th>
              </tr>
              <tr>
                <td height="172"><font color="white">&nbsp;</font>
                    <!-- #include file="actualites.asp" -->
                </td>
              </tr>
              <tr>
                <td height="54"><font color="white">&nbsp;</font></td>
              </tr>
              <tr>
                <td height="97"><font color="white">&nbsp;</font></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
        <p></p>
    </body>

</html>

lundi 21 février 2005 à 11:49:42 | Re : 2 sources JScript

bultez

Membre Club

Bonjour,

onload="initjsDOMenu()"
window.onload=start_countdown
l'un annule l'autre
sans vois plus avant
onload="initjsDOMenu(); start_countdown();"
par exemple, peut-être, si les script sont compatibles

Cordialement. Bul. ~Site~~Mail~



Cette discussion est classée dans : var, document, occasion, countdown, opentags


Répondre à ce message

Sujets en rapport avec ce message

Demande d'aide sur un code [ par bartok79 ] Bonjour, je ne savais pas trop quel thème choisir, excusez moi si je ne suis pas dans le bon.Je n'y comprends pas grang chose. J'ai téléc modifié neige en hiver [ par vollibre ] Bonjour à tousVoila j'ai decidé de mettre un peut les mains dans le cambuit :)et déja j'ai un petit soucis qui je pense dois etre tres simple a regler Retourner valeur Fonction [ par piep14 ] Bonsoir, je souhaite récupérer deux valeurs d'une fonction. J'ai fait le code suite :Code :<pre class="alt2" styl Problème avec REGEX sous IE [ par death83 ] Salut a tous,je suis entrain de faire un petit script qui fonctionne bien sauf sur IE. J'ai une fonction qui permet la génération automatique d'un tex parametrage d'un script [ par zeroberto ] Bonjour,Je construit une page web permettant la lecture de videos datées (xxxx_061117_a.wma). Je dispose d'un script. Il doit manquer quelque chose ou Probleme de debutant [ par darkwhite ] Salut a tous. J'ai commencer le Javascript depuis une semaine donc je debute tout juste.J'ai commencé ce programme simple : .:Darlwhite:. Aide envoi formulaire asynchrone [ par shadow1779 ] Bonsoir,je souhaite envoyer un formulaire via xmlhttprequest afin de vérifier par une page php si certains champs n'existent pas deja dans la base de Problème de menu à arborescence [ par nougitch ] Bonjour,J'aimerai que quand je clique sur "Project", les 3 lignes de tableaux suivantes se baissent. (il faut impérativement que ce soit des tr).Merci infobulles et tableaux [ par David_monchy ] Salut à tous,j'ai pris ce script d'infobulle sur le net:    function affiche(action,contenu){            var voir;          &nb Variable modifiée alors que non concernée ?? [ par Evangun ] Bonjour à tous,encore un problème...j'ai déclaré mon tableaux "artistes".ensuite je veux en faire une copie : var expand_artistes_tab = artistes;ce no


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

A découvrir



 
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,452 sec (4)

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