Forum Moderators: open
<head>
<script language="JavaScript">
<!-- Begin
pubs=new Array();
liens=new Array();
pubT=0;
pub = -1;
function AfficherPub(pubs,pubDelay1) {
pubDelay = pubDelay1;
pub = pub + 1;
if (pub == pubs.length)
pub = 0;
document.pubImg.src = pubs[pub];
pubT = setTimeout("AfficherPub(pubs,pubDelay)", pubDelay1);
}
// End -->
</script>
<script language="JavaScript">
<!-- Begin
function VersionNavigateur(Netscape, Explorer) {
if ((navigator.appVersion.substring(0,3) >= Netscape && navigator.appName == 'Netscape') ¦¦
(navigator.appVersion.substring(0,3) >= Explorer && navigator.appName.substring(0,9) == 'Microsoft'))
return true;
else return false;
}
// End -->
</script>
</head>
<body onUnload="clearTimeout(pubT)">
<a href="" onClick="location=liens[pub]; return false">
<img name="pubImg" src="image0" width="20" height="20" border="0"></a>
<script language="JavaScript">
<!-- Begin
if (VersionNavigateur(3.0,4.0))
{
pubs[0] = document.pubImg.src;
liens[0]='url0';
pubs[1]="image1"
liens[1]="url1"
pubs[2]="image2"
liens[2]="url2"
AfficherPub(pubs,10000);
}
// End -->
</script>
</body>
</html>
thank you.
If I'm right and you don't get a new window with netcommr's code, try this:
<a href="" onClick="window.open(liens[pub]); return false">
Also, if you are using this for advertising, you'll probably want to control the features of the new window (especially the size). Here's a reference [webreference.com].
Hope this helps
Steve
(edited by: engine at 5:29 pm (utc) on Jan. 10, 2002)