| 
	 | 
|   | 
            Terms of Agreement:    
	 By using this article, you agree to the following terms...    
	 1) You may use 
	 this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.    
	 2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.    
	 3) You may link to this article from another website, but ONLY if it is not wrapped in a frame.  
	 4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.   |  Creating an iframe scroller (similar to the one used by
PSC). 
Ok, so this is based mainly on a script by Dynamic
Drive, but I think many people would be interested in it, since it creates
a scroller very similar to the one you see on the left side of
Planet-Source-Code. It's an iframe scroller where the contents is contained
inside a external document. 
The script comes in two parts: 
Index.htm: 
<!--This script by Dynamic Drive
(http://www.dynamicdrive.com)--> 
<!--Modified by Mike Thompson--> 
<iframe id="datamain" src="external.htm" width=150 height=150 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=1 scrolling=no></iframe> 
External.htm 
<html> 
<body> 
 
<div id="datacontainer" style="position:absolute;left:0;top:10;width:100%" onMouseover="scrollspeed=0" onMouseout="scrollspeed=cache"> 
 
<!-- ADD YOUR SCROLLER COMMENT INSIDE HERE---------------------> 
 
YOUR CONTENT HERE 
 
<!-- END SCROLLER CONTENT----------------------------------------> 
 
<div> 
 
<script language="JavaScript1.2"> 
 
//<iframe> script by Dynamicdrive.com
//      
 
//Specify speed of scroll. Larger=faster
//     (ie: 5) 
var scrollspeed=cache=2 
 
function initialize(){ 
marqueeheight=document.all? parent.document.all.datamain.height : parent.document.getElementById("datamain").getAttribute("height") 
dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer") 
dataobj.style.top=5 
thelength=dataobj.offsetHeight 
setTimeout("scrolltest()",200) 
} 
  
function scrolltest(){ 
dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed 
if (parseInt(dataobj.style.top)<thelength*(-1)) 
dataobj.style.top=5 
setTimeout("scrolltest()",50) 
} 
  
window.onload=initialize 
 
</script> 
 
</body> 
</html> 
The entire script is also attached as a zip file, so you can
begin using it right away on your site.  |    | 
 Download article
  Note: Due to the size or complexity of this submission,   the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.
  Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.
  FOR YOUR OWN SAFETY, PLEASE: 1)Re-scan downloaded files using your personal virus checker before using it. 2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com
 
  | 
       Terms of Agreement:    
	 By using this article, you agree to the following terms...    
	 1) You may use 
	 this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.    
	 2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.    
	 3) You may link to this article from another website, but ONLY if it is not wrapped in a frame.  
	 4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.   | 
   Other 6 submission(s) by this author
  | 
   |   
|   | 
| Report Bad Submission | 
   | 
 |   | 
| Your Vote! | 
| 
See Voting Log  | 
|   | 
| Other User Comments | 
4/5/2002 8:09:02 AM:Tycoon [ Oli ] I haven't tried your code, but from a 
quick glance at it, i noticed a 
mistake. Just before the start of the 
javascript code, it should be </DIV> , 
and not  | 
4/12/2002 5:27:34 AM:Tailgunner good work.  
  | 
2/26/2003 3:51:19 AM: wow.. it works....
u will look better 
with more customization...  
  | 
7/12/2003 6:02:38 PM: This code works just great, but a 
suggestion for the users that want to 
use this.  It skips.  So you need to 
put several   before the info.  
  | 
7/12/2003 6:04:36 PM: An addendum to the previous comment, 
you need to put BREAKS in before the 
info.  It didn't put the tag in. :(  
  | 
 | 
    |   Add Your Feedback! |   
    Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.
  NOTICE: The author of this article has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.
  For feedback not related to this particular article, please click here.     |   
   |