Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Slideshow combined with HTML "map"

Status
Not open for further replies.

TSch

Technical User
Jul 12, 2001
557
0
0
DE
Hi folks,

I found a little script to run a slideshow on my page:

Code:
 <!DOCTYPE html>
<html>
 <head>
  <title>Slideshow</title>
 </head>
<body>

<?php

# Imagedirectory
$verzeichnis = "2/";

# Speed
# 3000 = 3 Seconds
$peed = 1000;

echo "
<div style='text-align: center;'><img id='dummy' src='#'></div>

<script type='text/javascript'>
var bild = new Array();
var i = 0;
";

$ordner = openDir($verzeichnis);
$by = 0;
while ($file = readDir($ordner)) {
 if($file != "." && $file != "..") {
  echo "bild[$by]='$verzeichnis$file';\n";
  $by++;
 }
}
closeDir($ordner);

echo "
function anzeigen() {
 if (i < bild.length) {
  document.getElementById('dummy').src=bild[i];
  i++;
 }
 else {
  i = 0;
 }
  setTimeout('anzeigen()', $peed);
}
anzeigen();
</script>
";
?>

</body>
</html>

Now i was wondering ...

Is it somehow possible to combine the slides with this:

Code:
<map name="Something">
    <area shape="rect" coords="11,10,159,129"
          href="[URL unfurl="true"]http://www.something.com/"[/URL] alt="Something" title="Something">
</map>

So that I can click on a certain area of a slide and it opens me another URL ?

Regards,
Thomas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top