Affiliate Programs
 
Search affiliate programs for: 
Affiliate Categories
» Affiliate Networks
» Ad Networks
» 2 Tier Programs
» Pay Per Sale
» Pay Per Lead
» Residual Income
» Datafeeds
» Multi Tier Programs
» Business Opps
» Other Programs

Newsletter
Get newly added affiliate programs by email. Enter your email here:
Article Categories
» Affiliate Marketing
» Business
» Ecommerce
» Hosting
» Marketing
» Sales
» Web Designing
» Webmasters
» SEO & Promotion
» Working At Home
» Other Articles
» Affiliate Glossary


Go Back   AffiliateSeeking Forum > Website Creation, Design & Maintenance > Programming > JavaScript

JavaScript Discuss about JavaScript problems you are having or help others with their JavaScript issues.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-14-2009, 02:17 PM
JavaScriptBank JavaScriptBank is offline
Member
 
Join Date: Jul 2009
Posts: 92
JavaScriptBank is on a distinguished road
Default Free JavaSccript codes

[SIZE="5"]Free JavaSccript codes[/SIZE]

Horizontal Scroller

Similar above script and hover your mouse over the textarea to pause the scroller.... detail

[IMG]hxxp ://w w w.javascriptbank. com/javascript.images/scroller/horizontal-scroller.jpg[/IMG]
Demo: Horizontal Scroller

[SIZE="4"]How to setup[/SIZE]

Step 1: Place HTML below in your BODY section
HTML
Code:
<script language="javascript">
/*******************************************
Horizontal Scroller (Marquee Replacement) v-1.2
Brian Gosselin

Version info:

V-1.0: Initial release.
V-1.1: Fixed a bug where the content causes parent container
       element to shrink and grow in NS6.
V-1.2: Added selectable support for pausing the scrolling
       when box moused-over.
*******************************************/

//ENTER CONTENT TO SCROLL BELOW.
var content='You <s>can</s> &quot;put&quot; any <b>HTML</b> <font color="red">in</font> <i>here</i>. Note: any content exceeding the boxwidth setting will wrap to another line.';

var boxheight=45;          //BACKGROUND BOX HEIGHT IN PIXELS.
var boxwidth=390;          //BACKGROUND BOX WIDTH IN PIXELS.
var boxcolor="#FFF6e9";    //BACKGROUND BOX COLOR.
var speed=60;              //SPEED OF SCROLL IN MILLISECONDS (1 SECOND=1000 MILLISECONDS)..
var pixelstep=2;           //PIXELS "STEPS" PER REPITITION.
var goright=false;         //LEFT TO RIGHT=TRUE , RIGHT TO LEFT=FALSE
var pauseOnmouseover=true; //SET TO "true" TO ENABLE PAUSE WHEN MOUSEOVER, "false" TO DISABLE IT.

//** DO NOT EDIT BEYOND THIS POINT **
var outer,inner,ref,elementwidth;
var w3c=(document.getElementById)?true:false;
var ns4=(document.layers)?true:false;
var ie4=(document.all && !w3c)?true:false;
var ie5=(document.all && w3c)?true:false;
var ns6=(w3c && navigator.appName.indexOf("Netscape")>=0)?true:false;
var txt='';
var goscroll=true;
if(ns4){
txt+='<table cellpadding=0 cellspacing=0 border=0 height='+boxheight+' width='+boxwidth+'><tr><td>';
txt+='<ilayer name="ref" bgcolor="'+boxcolor+'" width="'+boxwidth+'" height="'+boxheight+'"></ilayer>';
txt+='</td></tr></table>';
txt+='<layer name="outer" bgcolor="'+boxcolor+'" visibility="hidden" width="'+boxwidth+'" height="'+boxheight+'" '+((pauseOnmouseover)? 'onmouseover="goscroll=false" onmouseout="goscroll=true"':'')+'>';
txt+='<layer name="inner"  visibility="hidden" left="2" top="2">';
txt+=content;
txt+='</layer></layer>';
}else{
txt+='<div id="ref" style="position:relative; width:'+boxwidth+'; height:'+boxheight+'; visibility:visible; background-color:'+boxcolor+';" '+((pauseOnmouseover)? 'onmouseover="goscroll=false" onmouseout="goscroll=true"':'')+'></div>';
txt+='<div id="outer" style="position:absolute; width:'+boxwidth+'; height:'+boxheight+'; visibility:hidden; background-color:'+boxcolor+'; overflow:hidden;">';
txt+='<div id="inner"  style="position:absolute; visibility:hidden; left:2px; top:2px; overflow:hidden; cursor:default;" '+((pauseOnmouseover)? 'onmouseover="goscroll=false" onmouseout="goscroll=true"':'')+'>';
txt+=content;
txt+='</div></div>';
}
document.write(txt);
txt=0;

function getPageLeft(el){
var x;
if(ns4)return el.pageX;
if(ie4||w3c){
x = 0;
while(el.offsetParent!=null){
x+=el.offsetLeft;
el=el.offsetParent;
}
x+=el.offsetLeft;
return x;
}}

function getPageTop(el){
var y;
if(ns4)return el.pageY;
if(ie4||w3c){
y=0;
while(el.offsetParent!=null){
y+=el.offsetTop;
el=el.offsetParent;
}
y+=el.offsetTop;
return y;
}}

function getElWidth(el){
if(ns4)return (el.document.width)? el.document.width : el.clip.right-el.clip.left;
else if(ie4||ie5)return (el.style.width)? el.style.width:el.clientWidth;
else if(w3c)return (el.style.width)?parseInt(el.style.width):parseInt(el.offsetWidth);
else return -1;
}

window.onresize=function(){
if(ns4)setTimeout('history.go(0)', 400);
else{
outer.style.left=getPageLeft(ref)+'px';
outer.style.top=getPageTop(ref)+'px';
}}

function scrollbox(){
if(goscroll){
if(ns4){
inner.left+=(goright)? pixelstep: -pixelstep;
inner.clip.right=(boxwidth-inner.left-2>boxwidth)? boxwidth-2 : boxwidth-inner.left-2;
inner.clip.left=-inner.left+2;
if(goright){
if(inner.left>boxwidth)inner.left=-elementwidth;
}else{
if(inner.left<-elementwidth)inner.left=boxwidth+2;
}}else{
inner.style.left=parseInt(inner.style.left)+((goright)? pixelstep: -pixelstep)+'px';
if(goright){
if(parseInt(inner.style.left)>boxwidth)inner.style.left=-elementwidth+'px';
}else{
if(parseInt(inner.style.left)<-elementwidth)inner.style.left=boxwidth+2+'px';
}}}}

window.onload=function(){
ref=(ns4)?document.layers['ref']:(ie4)?document.all['ref']:document.getElementById('ref');
outer=(ns4)?document.layers['outer']:(ie4)?document.all['outer']:document.getElementById('outer');
inner=(ns4)?outer.document.layers['inner']:(ie4)?document.all['inner']:document.getElementById('inner');
elementwidth=getElWidth(inner);
if(ns4){
outer.clip.width=boxwidth;
outer.clip.height=boxheight;
outer.moveTo(getPageLeft(ref),getPageTop(ref));
inner.left=(goright)? -elementwidth : boxwidth-2;
inner.clip.width=0
inner.clip.height=boxheight-4;
outer.visibility="show";
inner.visibility="show";
}else{
outer.style.left=getPageLeft(ref)+'px';
outer.style.top=getPageTop(ref)+'px';
inner.style.width=elementwidth+'px';
inner.style.left=((goright)? -elementwidth : boxwidth-2)+'px';
inner.style.visibility="visible";
}
setInterval('scrollbox()',speed);
}
</script>
</td></tr></table>
	<!--
    	This script downloaded from w w w.JavaScriptBank. com
    	Come to view and download over 2000+ free javascript at w w w.JavaScriptBank. com
	-->





JavaScript Vertical Marquee - JavaScript DHTML analog clock - JavaScript Backwards Text
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 11-10-2010, 07:39 AM
jurwanwall jurwanwall is offline
Member
 
Join Date: Nov 2010
Posts: 85
jurwanwall is on a distinguished road
Default Java Script Code

Javascript code is a scripting language designed for use within a web page and/or on a web server. It is used to create special effects within a web page.

Elements such as links, images and forms can all be manipulated using this powerful technology.

Unlike CGI scripts, javascript codes can be placed directly into your HTML code. It can also reside on your server and be called from a small code within your web page.

If you'd like to place your javascript code within a file on your server, you will need to open a plain text editor and place your javascript code within the editor. The javascript code file should then be saved with a .js extension.

In order to call your javascript code, you will need to link to the file. You can do so by placing a small javascript code within the HTML of your web page that looks something like this:
__________________
Designer Sunglass Reviews
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

vB 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 +1. The time now is 12:46 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0
© 2004-2011 AffiliateSeeking. All rights reserved.