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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Slide Show

Status
Not open for further replies.

rac55

Programmer
Jul 1, 2003
62
AU
Hi

I am trying to create a slideshow whcih works when referencing jpgs or gifs in the array. However I need to reference <script type="text/javascript" src=" instead o images/test.gif

e.g.

var pictures = new Array
// List all the pictures in the slideshow here
(
"<script type=\"text/javascript\" src=\","<script type=\"text/javascript\" src=\","<script type=\"text/javascript\" src=\");

Does anyoen know where I'm goign wrong? Your help would be greatly appreciated

Thanks
Rachel
 
Hi Lee

Thanks for replying so quickly. I tried that but the images are not displayed that way.

Thanks
Rachel
 
Just took a look at what you actually had with those URLs. You're doing this the hard way. Try something like this:

Code:
<script language="javascript">

var mapnums = [4000, 2000, 8000];
var mi = 0;
function switchmap()
{
var mstring = '<!-- Weatherzone graphic -->';
mstring += '<map id="__WZ_GRAPHIC_FCAST_MAP_' + mapnum[mi] + '__" ';
mstring += 'name="__WZ_GRAPHIC_FCAST_MAP_' + mapnum[mi] + '__">';
mstring += '<area shape="rect" coords="0, 0, 124, 40" ';
mstring += 'href="[URL unfurl="true"]http://www.weatherzone.com.au/local/wxSearch.jsp?searchString='[/URL] + mapnum[mi] + '" ';
mstring += 'target="_blank" alt="click for more">';
mstring += '<area shape="rect" coords="0, 40, 124, 79" ';
mstring += 'href="[URL unfurl="true"]http://www.weatherzone.com.au/weatherYourSite.jsp"[/URL] ';
mstring += ' target="_blank" alt="click for weather on your site">';
mstring += '</map>';
mstring += '<img src="[URL unfurl="true"]http://www.weatherzone.com.au/servlet/au.com.theweather.weatherzone.woys.WOYSGraphicManager?graphic=graphic_fcast&postcode='[/URL] + mapnum[mi] + '" ';
mstring += 'width="125" height="80" ';
mstring += 'usemap=\"#__WZ_GRAPHIC_FCAST_MAP_' + mapnum[mi] + '__\" ';
mstring += 'ismap border="0" alt="click for more" />';

document.getElementById('mapdiv').innerHTML = mstring;

mi++;
mi %= mapnums.length;

}
</script>
<div id="mapdiv">

</div>

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top