Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    114

    Helpful JavaScript for Web development

    Helpful JavaScript for Web development

    DHTML Fading Animation Image

    Enhancing image presentation on your website with this image rotator plus smooth dynamic motion (fade-in-fade-out). A very great anima... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup

    Step 1: Use JavaScript code below to setup the script
    JavaScript
    Code:
    <SCRIPT language=javaScript>
    <!-- Beginning of JavaScript -
    
    sandra0 = new Image();
    sandra0.src = "photo1.jpg";
    
    sandra1 = new Image();
    sandra1.src = "photo2.jpg";
    
    sandra2 = new Image();
    sandra2.src = "photo3.jpg";
    
    var i_strngth=1
    var i_image=0
    
    var imageurl = new Array()
    imageurl[0] ="photo1.jpg"
    imageurl[1] ="photo2.jpg"
    imageurl[2] ="photo3.jpg"
    
    
    function showimage() {		
    	if(document.all) {
    		if (i_strngth <=110) {
    			testimage.innerHTML="<img style='filter:alpha(opacity="+i_strngth+")' src="+imageurl[i_image]+" border=0>";
    			i_strngth=i_strngth+10
    			var timer=setTimeout("showimage()",100)
    		}	
    		else {
    			clearTimeout(timer)
    			var timer=setTimeout("hideimage()",1000)
    		}
    	}	
    	
    	if(document.layers) {
    			clearTimeout(timer)
    			document.testimage.document.write("<img src="+imageurl[i_image]+" border=0>")
    			document.close()
    			i_image++
    			if (i_image >= imageurl.length) {i_image=0}	
    			var timer=setTimeout("showimage()",2000)
    				
    	}	
    }
    
    
    function hideimage() {		
    	if (i_strngth >=-10) {
    		testimage.innerHTML="<img style='filter:alpha(opacity="+i_strngth+")' src="+imageurl[i_image]+" border=0>";
    		i_strngth=i_strngth-10
    		var timer=setTimeout("hideimage()",100)
    	}	
    	else {
    		clearTimeout(timer)
    		i_image++
    		if (i_image >= imageurl.length) {i_image=0}
    		i_strngth=1
    		var timer=setTimeout("showimage()",500)	
    	}
    }
    
    
    // - End of JavaScript - -->
    </SCRIPT>
    Step 2: Place HTML below in your BODY section
    HTML
    Code:
    <BODY onload=showimage()>
    <DIV id=mainbod style="POSITION: relative; VISIBILITY: visible"></DIV>
    
    <DIV id=testimage style="POSITION: relative; VISIBILITY: visible"></DIV>
    </BODY>





    JavaScript Spotlight - JavaScript Validate E-Mail - AJAX Page Content Loader
    Quote Originally Posted by Copyright
    The Site may provide, or third parties may provide, links to non-JavaScriptBank.com Internet World Wide Web sites or resources. Because JavaScriptBank.com has no control over such sites and resources, you acknowledge and agree that JavaScriptBank.com is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. You further acknowledge and agree that JavaScriptBank.com shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such site or resource.

  2. #2
    Registered User
    Join Date
    Mar 2010
    Posts
    12
    Great post.There were a bunch of methods I hadn’t yet heard of.

    ------------------------------
    Sports Supplements
    Sports Nutrition

  3. #3
    Registered User
    Join Date
    Apr 2010
    Location
    Cebu,Philippines
    Posts
    9
    Thanks For Sharing .

  4. #4
    Junior Member JemsRoker's Avatar
    Join Date
    Mar 2010
    Location
    Bangle of India
    Posts
    27
    The information is helpful for new guy.

    Website Design | | Search Engine Optimization

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.