javascript noscript question

by coog
2 replies
I'm trying to figure out how to handle this and am left scratching my head. I can put a noscript in here so it will show a single image if javascript is disabled, the noscript is easy enough, but how do you hide the javascript img so i don't get the missing image (red x)? I don't think php can detirmine if JS is on or off so...

Here's the code, any suggestions greatly appreciated

PHP Code:
<img src="" name="Rotating" id="Rotating1"/>

<
script language="JavaScript">
  var 
ImageArr1 = new Array("1.jpg","2.jpg","3.jpg");
  var 
ImageHolder1 document.getElementById('Rotating1');
  
  function 
RotateImages(whichHolder,Start)
  {
      var 
= eval("ImageArr"+whichHolder);
      var 
= eval("ImageHolder"+whichHolder);
      if(
Start>=a.length)
          
Start=0;
      
b.src a[Start];
      
window.setTimeout("RotateImages("+whichHolder+","+(Start+1)+")",2500);
  }
  
  
RotateImages(1,0);
</script> 
#javascript #noscript #question
  • Profile picture of the author wayfarer
    Well, you will need to insert the image with JavaScript, if you don't want it to display when JavaScript is disabled. Do you need help figuring out how to do that?
    Signature
    I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs
    {{ DiscussionBoard.errors[624604].message }}
    • Profile picture of the author coog
      Originally Posted by wayfarer View Post

      Well, you will need to insert the image with JavaScript, if you don't want it to display when JavaScript is disabled. Do you need help figuring out how to do that?
      Thanks wayfarer, no I can get it. So simple I can't believe I didn't think of that
      {{ DiscussionBoard.errors[625047].message }}

Trending Topics