Internet Marketing Forums - Where Great Marketing Ideas Come to Life Internet Marketing Forums - Where Great Marketing Ideas Come to Life

Go Back   Internet Marketing Forums .Net > Internet Marketers' Products and Services > Programming / Scripts
User Name
Password
Register FAQ Members List Classifieds Blog Mark Forums Read

Notices

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-14-2009, 08:19 AM
JavaScriptBank's Avatar
Set Avatar
Junior Member
 
Join Date: Jul 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
JavaScriptBank is on a distinguished road
Buy me a Beer?
Usefull JavaScripts

JavaScript Collector

Unobtrusive JavaScript Image Rollovers

Create Domain Name Registration, E-mail, Web Hosting rollovers for your JavaScript navigation without hardcoding any JavaScript into the ... detail


How to setup

Step 1: CSS below for styling thescript, place it into HEAD section
CSS
Code:
<style type="text/css">

img {border: none;}
ul {list-style-type:none;}
ul li {display:inline;}

</style>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 2: Copy & Paste JavaScript code below in your HEAD section
JavaScript
Code:
<script language="javascript">
/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
By: Christian Watson :: http://www.smileycat.com
Based on a script by Chris Nott: http://www.dithered.com/javascript/rollovers/index.html
License: http://creativecommons.org/licenses/by/1.0/
Futher info: http://www.smileycat.com/miaow/archives/000224.html */

function isDefined(property) {
  return (typeof property != 'undefined');
}

var rolloverInitialized = false;
function rolloverInit() {
  if (!rolloverInitialized && isDefined(document.images)) {
     var bodyId = document.body.id;    // ID of the BODY tag
     // get all images (including all <input type="image">s)
     // use getElementsByTagName() if supported
     var images = new Array();
     if (isDefined(document.getElementsByTagName)) {
        images = document.getElementsByTagName('img');
        var inputs = document.getElementsByTagName('input');
        for (var i = 0; i < inputs.length; i++) {
           if (inputs[i].type == 'image') {
              images[images.length] = inputs[i];
           }
        }
     }

     // otherwise, use document.images and document.forms collections
     // remove if not supporting IE4, Opera 4-5
     else {
        images = document.images;
        inputs = new Array();
        for (var formIndex = 0; formIndex < document.forms.length; formIndex++) {
           for (var elementIndex = 0; elementIndex < document.forms.elements.length; elementIndex++) {
              if (isDefined(document.forms.elements[i].src)) {
                 inputs[inputs.length] = document.forms.elements[i];
              }
           }
        }
     }

     // get all images with '_off.' in src value excepting the one that is for the BODY
     for (var i = 0; i < images.length; i++) {
        if (images[i].src.indexOf('_off.') != -1) {

           // check for BODY image, and turn it 'on' if found
           if (images[i].src.indexOf(bodyId) != -1)
              images[i].src = images[i].src.replace(/_off\./, '_on.');
           else {
           var image = images[i];

           // store the off state filename in a property of the image object
           image.offImage = new Image();
           image.offImage.src = image.src;

           // store the on state filename in a property of the image object
           // (also preloads the on state image)
           image.onImage = new Image();
           image.onImage.imageElement = image;

           // add onmouseover and onmouseout event handlers once the on state image has loaded
           // Safari's onload is screwed up for off-screen images; temporary fix
           if (navigator.userAgent.toLowerCase().indexOf('safari') != - 1) {
              image.onmouseover = function() {
                 this.src = this.onImage.src;
              };
              image.onmouseout = function() {
                 this.src = this.offImage.src;
              };
           }
           else {
              image.onImage.onload = function() {
                 this.imageElement.onmouseover = function() {
                    this.src = this.onImage.src;
                 };
                 this.imageElement.onmouseout = function() {
                    this.src = this.offImage.src;
                 };
              };
           }

           // set src of on state image after defining onload event handler
           // so cached images (that load instantly in IE) will trigger onload
           image.onImage.src = image.src.replace(/_off\./, '_on.');

          }
        }
     }
  }
  rolloverInitialized = true;
}

// call rolloverInit when document finishes loading
if (isDefined(window.addEventListener)) {
   window.addEventListener('load', rolloverInit, false);
}
else if (isDefined(window.attachEvent)) {
   window.attachEvent('onload', rolloverInit);
}

function test(){alert('This is test only');}
</script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->
Step 3: Copy & Paste HTML code below in your BODY section
HTML
Code:
<div id="navbar" align="center">
<ul>
  <li><a href="javascript:onclick=test();"><img src="home_off.gif" alt="Home" /></a></li>
  <li><a href="javascript:onclick=test();"><img src="about_off.gif" alt="About" /></a></li>
  <li><a href="javascript:onclick=test();"><img src="donate_off.gif" alt="Donate" /></a></li>
</ul>
</div>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->





JavaScript Bookmark Page script - JavaScript Color Wheel - JavaScript Image slideshow
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-04-2009, 10:57 PM
juanaballerina's Avatar
Set Avatar
Distinguished Member
 
Join Date: Oct 2009
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
juanaballerina is on a distinguished road
Many thank's for your attention or thread.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-26-2009, 09:29 AM
arbaba's Avatar
Set Avatar
Banned
 
Join Date: Oct 2009
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
arbaba is on a distinguished road
Many thanks for this information.That was very useful.


Egypt Holidays
China Travel

Last edited by arbaba; 10-26-2009 at 09:44 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-08-2009, 01:32 AM
automarketting's Avatar
Set Avatar
Distinguished Member
 
Join Date: Dec 2009
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
automarketting is on a distinguished road
Many thanks for sharing java codes with us. this was of gr8 use for me.
keep posting such new codes.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -5. The time now is 07:38 AM.



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Internet Marketing ForumsAd Management by RedTyger

Internet Marketing News | Prospect Response
Hosted By Server Yard

Internet Marketing Forums - Bringing Internet Marketing Ideas to Reality Internet Marketing Forums - Bringing Internet Marketing Ideas to Reality Internet Marketing Forums - Bringing Internet Marketing Ideas to Reality

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19