<div id="introScript"> <script type="text/javascript"> var imgs1 = new Array("http://www.smftutorials.com/images/r-banners/pic1.jpg","http://www.smftutorials.com/images/r-banners/pic2.jpg","http://www.smftutorials.com/images/r-banners/pic3.jpg","http://www.smftutorials.com/images/r-banners/pic4.jpg","http://www.smftutorials.com/images/r-banners/pic5.jpg","http://www.smftutorials.com/images/r-banners/pic6.jpg","http://www.smftutorials.com/images/r-banners/pic7.jpg","http://www.smftutorials.com/images/r-banners/pic8.jpg","http://www.smftutorials.com/images/r-banners/pic9.jpg","http://www.smftutorials.com/images/r-banners/pic-10.jpg","http://www.smftutorials.com/images/r-banners/pic-11.jpg","http://www.smftutorials.com/images/r-banners/pic-12.jpg","http://www.smftutorials.com/images/r-banners/pic-13.jpg"); var lnks1 = new Array("http://www.soapmakingforum.com","http://www.smftutorials.com/how-to-make-sand-candles-tutorial.html","http://www.smftutorials.com/how-to-make-soap-scroll-tutorial.html","http://www.smftutorials.com/how-to-make-bath-bombs-tutorial.html","http://www.smftutorials.com/how-to-make-melt-and-pour-gemstone-and-rock-soap-tutorial-revisited.html","http://www.smftutorials.com/6-color-swirl-tutorial.html","http://www.smftutorials.com/how-to-line-a-wooden-soap-mold-tutorial.html","http://www.smftutorials.com/soap-packaging-idea-tutorial.html","http://www.smftutorials.com/how-to-make-rebatch-soap-tutorial.html","http://www.smftutorials.com/how-to-make-salt-soap.html","http://www.smftutorials.com/how-to-make-your-own-silicone-soap-mold-liners-tutorial.html","http://www.smftutorials.com/how-to-make-your-own-custom-soap-stamps-tutorial.html","http://www.smftutorials.com/soap-wrapping-ideas-tutorial.html"); var alt1 = new Array("Visit Soap Making Forum","Learn To Make Sand Candles","Learn To Make Soap Scrolls","Learn To Make Bath Bombs","Learn To Make Soap Rocks","Learn To Swirl","Learn To Line a Wooden Soap Mold","Elegant Packaging Ideas","Learn To Make Rebatched Soap","Learn To Make Salt Soap","Learn To Make Silicone Mold Liners","Learn To Make a Soap Stamp","Soap Packaging Ideas"); var currentAd1 = 0; var imgCt1 = 13; function cycle1() { if (currentAd1 == imgCt1) { currentAd1 = 0; } var banner1 = document.getElementById('adBanner1'); var link1 = document.getElementById('adLink1'); banner1.src=imgs1[currentAd1] banner1.alt=alt1[currentAd1] document.getElementById('adLink1').href=lnks1[currentAd1] currentAd1++; } window.setInterval("cycle1()",3000); </script> <a href=""http://www.soapmakingforum.com"" id="adLink1" target="_top"> <img src="http://www.smftutorials.com/images/r-banners/pic1.jpg" id="adBanner1" border="0" width="500" height="250"></a> </div><!-- introScript--> Code (markup): I like the display of this script right now, but I don't like how it switches from links to images and back again, (and example can be found here): http://www.smftutorials.com/testing/template.html My idea is to have the js display the banners, but then for people who have js off Id like something to be displayed in alternative instead of nothing showing up at all... ..... Thanks!!
ok, i'l bite...... here is one way to do it - there are others..... : your original div " introScdript" should contain just the stuff you want to see if there user has javascript / enabled javascript. create a second div after that one ( i named it "nojava" ) and place insideit all the stuff you want them to see if they don't have java. i put a simple list there for example purposes then through the principles of 'progressive enhancement' (at least as i understand them - i am no expert) you turn off the display of the first div, and let the second div appear as the default. then and only if there is javascript ability, java turns off the display of the second div and turns on the first div. here is complete code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> </head> <style type="text/css"> #introScript {display:none } </style> <script type="text/javascript"> function checkForJava(){ document.getElementById("nojava").style.display="none"; document.getElementById("introScript").style.display="inline"; } </script> <body onload="checkForJava()"> <div id="introScript"> <script type="text/javascript"> var imgs1 = new Array("http://www.smftutorials.com/images/r-banners/pic1.jpg","http://www.smftutorials.com/images/r-banners/pic2.jpg","http://www.smftutorials.com/images/r-banners/pic3.jpg","http://www.smftutorials.com/images/r-banners/pic4.jpg","http://www.smftutorials.com/images/r-banners/pic5.jpg","http://www.smftutorials.com/images/r-banners/pic6.jpg","http://www.smftutorials.com/images/r-banners/pic7.jpg","http://www.smftutorials.com/images/r-banners/pic8.jpg","http://www.smftutorials.com/images/r-banners/pic9.jpg","http://www.smftutorials.com/images/r-banners/pic-10.jpg","http://www.smftutorials.com/images/r-banners/pic-11.jpg","http://www.smftutorials.com/images/r-banners/pic-12.jpg","http://www.smftutorials.com/images/r-banners/pic-13.jpg"); var lnks1 = new Array("http://www.soapmakingforum.com","http://www.smftutorials.com/how-to-make-sand-candles-tutorial.html","http://www.smftutorials.com/how-to-make-soap-scroll-tutorial.html","http://www.smftutorials.com/how-to-make-bath-bombs-tutorial.html","http://www.smftutorials.com/how-to-make-melt-and-pour-gemstone-and-rock-soap-tutorial-revisited.html","http://www.smftutorials.com/6-color-swirl-tutorial.html","http://www.smftutorials.com/how-to-line-a-wooden-soap-mold-tutorial.html","http://www.smftutorials.com/soap-packaging-idea-tutorial.html","http://www.smftutorials.com/how-to-make-rebatch-soap-tutorial.html","http://www.smftutorials.com/how-to-make-salt-soap.html","http://www.smftutorials.com/how-to-make-your-own-silicone-soap-mold-liners-tutorial.html","http://www.smftutorials.com/how-to-make-your-own-custom-soap-stamps-tutorial.html","http://www.smftutorials.com/soap-wrapping-ideas-tutorial.html"); var alt1 = new Array("Visit Soap Making Forum","Learn To Make Sand Candles","Learn To Make Soap Scrolls","Learn To Make Bath Bombs","Learn To Make Soap Rocks","Learn To Swirl","Learn To Line a Wooden Soap Mold","Elegant Packaging Ideas","Learn To Make Rebatched Soap","Learn To Make Salt Soap","Learn To Make Silicone Mold Liners","Learn To Make a Soap Stamp","Soap Packaging Ideas"); var currentAd1 = 0; var imgCt1 = 13; function cycle1() { if (currentAd1 == imgCt1) { currentAd1 = 0; } var banner1 = document.getElementById('adBanner1'); var link1 = document.getElementById('adLink1'); banner1.src=imgs1[currentAd1] banner1.alt=alt1[currentAd1] document.getElementById('adLink1').href=lnks1[currentAd1] currentAd1++; } window.setInterval("cycle1()",3000); </script> <a href=""http://www.soapmakingforum.com"" id="adLink1" target="_top"> <img src="http://www.smftutorials.com/images/r-banners/pic1.jpg" id="adBanner1" border="0" width="500" height="250"></a> </div><!-- introScript--> <div id="nojava"> <ul> <li> first link </li> <li> second link </li> <li> third link </li> <li> fourth link </li> </ul> </div><!-- no java alternate div --> </body> </html> Code (markup): hope that helps, or at least gives you leads to follow
thank you sooo much yeah that was pretty much exactly what I was looking for!!! I also want to eliminate the part but when I do the script doesnt work? any clue how to do that? so its just images?