Pawan_Agarwal Posted March 20, 2014 Share Posted March 20, 2014 Javascript CODE: var m=n=0;function show_services(){m=m+1;n=m+1;if(m==6) {m=6;n=1;}if(m==7) {m=1;n=2;}str1 = "/images/pic" + m + ".PNG";str2 = "/images/pic" + n + ".PNG";document.getElementById('w1').innerHTML = str1;document.getElementById('w2').innerHTML = str2;document.getElementById('img1').src = str1;document.getElementById('img2').src = str2;} var my_str = setInterval(function() {show_services()},1000); ############################################################################## <img id="img1" src="/images/pic1.PNG" style="margin-top:30px" height="100px" width="550px"/><br> <img id="img2" src="/images/pic2.PNG" style="margin-top:30px" height="100px" width="550px"/><br> <br> <div id='w1'></div> <br> <div id='w2'></div> ############################################################################## the code is working fine, files have been placed at the right place, str1 and str2 are getting correct values and they are updating at the right time..............I run same code on browser and it works fine, but, when I run the same code on website domain, it does work at all, what can be the reason for this ............ Quote Link to comment https://forums.phpfreaks.com/topic/287126-code-is-running-but-images-are-not-changing/ Share on other sites More sharing options...
Pawan_Agarwal Posted March 21, 2014 Author Share Posted March 21, 2014 The same code is working on Xampp and html page , but it is not working when I apply the same code on my domain, I do not know why this is not working !!! I need urgent help on this !! Quote Link to comment https://forums.phpfreaks.com/topic/287126-code-is-running-but-images-are-not-changing/#findComment-1473426 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.