Jump to content
xisto Community
Sign in to follow this  
shivam3d

Dhtml Slideshow Javascript Not Fade!

Recommended Posts

Here is the CODE:

 

<!--BEGIN FADING DYNAMIC CONTENT SCRIPT--><script language="javascript">// Use Freely as long as following messages are intact :://---------------------------------------------------------------// Fading Dynamic Content JavaScript v 2.0					  |//	Made minor changes, Works on IE and NS6				   |//	Added support for NS4									 |//	Added option to AutoStart on load or onClick			  |// This script written and � 2002 Premshree Pillai.			 |// All rights reserved.										 |// Created on : 28/04/02										|// Modified on : 11/05/02									   |// Web : [url="https://qiksearch.com/"]qiksearch.com/;							  |// Mail : premshree@hotmail.com								 |// FREE JavaScripts at [url="https://qiksearch.com/javascripts.htm"]qiksearch.com/javascripts.htm; |// v 2.0 - Now supports NS4									 |// v 1.2 - Option to Autostart on load or click to start		|// v 1.1 - Supports IE and NS6, option to loop continuosly	  |// v 1.0 - Fading Dynamic Content							   |//---------------------------------------------------------------// Location of script : 
//--------------------------------------CUTOMISE----------------------------------------------
var qiksearch_js_text = new Array ("<img src='images/shivam1.gif' width='724' height='263' border='0'>", "<img src='images/shivam2.gif' width='724' height='263' border='0'>", "<img src='images/shivam3.gif' width='724' height='263' border='0'>", "<img src='images/shivam4.gif' width='724' height='263' border='0'>","<img src='images/shivam5.gif' width='724' height='263' border='0'>","<img src='images/shivam6.gif' width='724' height='263' border='0'>","<img src='images/shivam7.gif' width='724' height='263' border='0'>","<img src='images/shivam.gif' width='724' height='263' border='0'>");   // The Fading Contents, HTML Tags supportedvar qiksearch_space_width = 724; // The width of the content spacevar qiksearch_space_height = 50; // The height of the content spacevar qiksearch_space_borderw=3; // Border widthvar qiksearch_space_borderc="#FF9900"; // Border Colorvar timeOutVal=150; // Delay in millisecondsvar isLoop=true; // If you want to loop continuosly then true, else falsevar isAutoStart=true; // If you want the Fading to start else you have to click to startvar qiksearch_js_text_static='<a href="java script:resetAll();writeDiv();" style="text-decoration:none" accesskey="l"><font color="#808080" face="verdana,arial,helvetica" size="-1"><b>C<u>l</u>ick to Start</b></font></a>'; // The default content if AutoStart false//--------------------------------------------------------------------------------------------//-----------------------------DO-NOT-MODIFY-BELOW-THIS---------------------------------------var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1;var ns6=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1;var ns4=document.layers;var qiksearch_DyObj;var qiksearch_space_ns4_left=(screen.width/2-20)-Math.round(qiksearch_space_width/2);function setDyObj(){ if(ie4) {  qiksearch_DyObj=document.all.qiksearch_js_space; } if(ns6) {  qiksearch_DyObj=document.getElementById("qiksearch_js_space"); }}if(ie4||ns6){ document.write('<table width="' + qiksearch_space_width + '" height="' + qiksearch_space_height + '" style="background:#FFFFFF; border:' + qiksearch_space_borderw + 'px solid ' + qiksearch_space_borderc + '"><tr><td align="middle">'); document.write('<div id="qiksearch_js_space">'); document.write('</div>'); document.write('</td></tr></table>');}var def_10='A',def_11='B',def_12='C',def_13='D',def_14='E',def_15='F';var colorVal=15;var div_count=0;function qiksearch_fade_desat(getColorIntVal){ var returnVal; if(getColorIntVal>=10) {  for(var i=0; i<=15; i++)  {   if((getColorIntVal==i))   {	returnVal = eval('def_' + i);   }  } } else {  returnVal=getColorIntVal; } return(returnVal);}function writeDiv(){ if(ns4) {  qiksearch_DyObj=document.qiksearch_space_ns4; } if(ie4||ns6) {  qiksearch_DyObj.innerHTML= '<font face="verdana,arial,helvetica" size="-1" color="#' +  joinColor(qiksearch_fade_desat(colorVal)) + '"><b>' + qiksearch_js_text[div_count] + '</span></b></font>'; } if(ns4) {  qiksearch_DyObj.document.write('<table width="100%" border="1" bordercolor="' + qiksearch_space_borderc + '"><tr><td align="center"><font face="verdana,arial,helvetica" size="-1" color="#' +  joinColor(qiksearch_fade_desat(colorVal)) + '"><b>' + qiksearch_js_text[div_count] + '</span></b></font></td></tr></table>');  qiksearch_DyObj.document.close(); } if((colorVal>0)  && (colorVal!=0)) {  colorVal--; } else {  colorVal=15;  if(div_count<qiksearch_js_text.length)  {   div_count++;  }  if(div_count==qiksearch_js_text.length)  {   if(isLoop)   {	setTimeout("resetAll()",timeOutVal);	setTimeout("writeDiv()",timeOutVal);   }   else   {	if(ie4||ns6)	{	 qiksearch_DyObj.innerHTML = qiksearch_js_text_static;	}	if(ns4)	{	 qiksearch_DyObj.document.write('<table width="100%" border="1" bordercolor="' + qiksearch_space_borderc + '"><tr><td align="center">' + qiksearch_js_text_static + '</td></tr></table>');	 qiksearch_DyObj.document.close();	}   }  } } if(div_count<qiksearch_js_text.length) {  setTimeout("writeDiv()",timeOutVal); }}function joinColor(getColor){ return (getColor + '0' + getColor + '0' + getColor + '0');}function resetAll(){ div_count=0; colorVal=15;}setDyObj();function start_fader(){ if(isAutoStart) {  writeDiv(); } else {  if(ie4||ns6)  {   qiksearch_DyObj.innerHTML = qiksearch_js_text_static;  }  if(ns4)  {   qiksearch_DyObj=document.qiksearch_space_ns4;   qiksearch_DyObj.document.write('<table width="100%" border="1" bordercolor="' + qiksearch_space_borderc + '"><tr><td align="center">' + qiksearch_js_text_static + '</td></tr></table>');   qiksearch_DyObj.document.close();  } } }window.onload=start_fader;if(ns4){ document.write('<layer bgcolor="#FFFFFF" id="qiksearch_space_ns4" width="' + qiksearch_space_width + '" left="' + qiksearch_space_ns4_left + '"></layer>');}</script><!--END FADING DYNAMIC CONTENT SCRIPT-->
It is supposed to fade all the images, but the images don't fade. But if I put text at the place of image, the text fades. But I want my image to fade too. What Am I doing wrong?

 

The image URL provided in this script is of the root Dir, therefore you will not be able to see any image.

 

Thanks

Share this post


Link to post
Share on other sites

DHTML is pretty obsolete now and you should stick to AJAX based scripts like jQuery or Mootools as it will make your life a bit simpler. On top of that, it could be a browser compatibility issue that could be causing the images now to work properly.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.