Advanced HTML translation--i? about translating the JavaScript

Hi, I originally omitted translating the JavaScript functions' English names 
to French names, but
decided that might make the code more accessible.

So I tried.

As far as I know
'=' initializes something (to a value, whatever) and '==' tests to see if 
two things are equal
so
imagesdesPubs
URLsdePubs
cePub

all below are the first declarations of these variables--where the variables 
are initialized--and I am free to give them any name I want--
but my banner does not cycle:

http://www.geocities.com/quaiouestenglish/Creezunhabitatweb/index.html

Maybe the French translations of the English function names, etc. are too 
long????

(you have to go to near the bottom of Dr. Raggett's page to see the the 
function
also I've left the names of the JavaScript functions, arrays, index, and 
image name
in English
on the page whose URL is indexed in the translations
so the code in that page works:
http://www.geocities.com/quaiouestenglish/Creezunhabitatweb/RaggettHTMLavance.html 
  )

Sorry to trouble you.

I've left this in English so long!

I thought it would be nice to have it in French.

The only thing I've changed below is that I've changed the < to [ and the > 
to ] to make this display right.

--C. E. Whitehead
cewcathar@hotmail.com


* * *
[script type="text/javascript"]


if (document.images)
{
    imagesdesPubs = new 
Array("http://www.w3.org/MarkUp/Guide/hosts/csail.gif",
                "http://www.w3.org/MarkUp/Guide/hosts/ercim.gif",
                "http://www.w3.org/MarkUp/Guide/hosts/keio.gif");
    URLsdesPubs = new Array("www.csail.mit.edu",
                "www.ercim.org", "www.keio.ac.jp");
    cePub = 0;
}

function changezdePub()
{
    if (document.images)
    {
        if (document.bannierePub.complete)
        {
            if (++cePub == imagesdesPubs.length)
                cePub = 0;

            document.bannierePub.src = imagesdesPubs[cePub];
        }
    }

    // se faire rouler la banniere pour qu'elle se fasse changer aux 
intervalles
    // de trois secondes
    fixezlinterval("changezdePub()", 3000);
}

function allezyauPub()
{
    document.location.href = "http://" + URLsdesPubs[cePub];
}


[/script]

[body bgcolor="white" text="black" background="book.jpg" 
onload="changezdePub()"]

[p align="left"]Nos Sponsors: [a href="javascript:allezyauPub()"][img 
name="bannierePub"
src="http://www.w3.org/MarkUp/Guide/hosts/csail.gif" border="0" alt="Nos 
sponsors" width="48"
height="48"][/a][/p]


* * *

Below is Raggett's original code:

[script type="text/javascript"]


if (document.images)
{
    adImages = new Array("http://www.w3.org/MarkUp/Guide/hosts/csail.gif",
                "http://www.w3.org/MarkUp/Guide/hosts/ercim.gif", 
"http://www.w3.org/MarkUp/Guide/hosts/keio.gif");
    adURLs = new Array("www.csail.mit.edu",
                "www.ercim.org", "www.keio.ac.jp");
    thisAd = 0;
}

function cycleAds()
{
    if (document.images)
    {
        if (document.adBanner.complete)
        {
            if (++thisAd == adImages.length)
                thisAd = 0;

            document.adBanner.src = adImages[thisAd];
        }
    }

    // change to next sponsor every 3 seconds
    setTimeout("cycleAds()", 3000);
}

function gotoAd()
{
    document.location.href = "http://" + adURLs[thisAd];
}


  [/script]

[body bgcolor="white" text="black" background="book.jpg"
onload="cycleAds()"]


[p align="left"]Nos Sponsors: [a href="javascript:gotoAd()"][img
name="adBanner" src="http://www.w3.org/MarkUp/Guide/hosts/csail.gif"
alt="Nos sponsors" border="0" height="48" width="48"][/a][/p]

_________________________________________________________________
Need a break? Find your escape route with Live Search Maps. 
http://maps.live.com/?icid=hmtag3

Received on Saturday, 14 April 2007 15:13:09 UTC