Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Doubtful but maybe...

Status
Not open for further replies.

candrid

IS-IT--Management
Aug 30, 2001
38
US
Hey okay I got 2 quick questions... one is easy, the second is probally not possible, at least not by me.

1.) I know some people on the web have seen those sites that have the arrows on the actual webpage that you just drag the mouse over and the information in the page scrolls.
How do you do that?

2.) This is the hard one.. I want to have a counter inside of an image, or to be more exact would like to have that image have a number on it that increases just like a counter, is either possible? I'll take all the help I can get!

Thanks in advance! --"When your life is Hell, obstacles are nothing."
 
first question:
<style type=&quot;text/css&quot;>
#divUpControl{position:absolute; width:320; left:10; top:10; z-index:1; text-align: right}
#divDownControl{position:absolute; width:320; left:10; top:270; z-index:1; text-align: right}
#divContainer{position:absolute; width:320; height:240; overflow:hidden; top:30; left:10; clip:rect(0,320,240,0); visibility:hidden}
#divContent{position:absolute; top:0; left:0}
</style>
<script language=&quot;JavaScript&quot;>// begin absolutely positioned scrollable area object scripts
/*
Extension developed by David G. Miles (Original Scrollable Area code developed by Thomas Brattli
To add more shock to your site, visit Shock.com
*/

function verifyCompatibleBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf(&quot;MSIE 5&quot;)>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;

this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}
bw=new verifyCompatibleBrowser()


var speed=50

var loop, timer

function ConstructObject(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
this.up=MoveAreaUp;this.down=MoveAreaDown;
this.MoveArea=MoveArea; this.x; this.y;
this.obj = obj + &quot;Object&quot;
eval(this.obj + &quot;=this&quot;)
return this
}
function MoveArea(x,y){
this.x=x;this.y=y
this.css.left=this.x
this.css.top=this.y
}

function MoveAreaDown(move){
if(this.y>-this.scrollHeight+objContainer.clipHeight){
this.MoveArea(0,this.y-move)
if(loop) setTimeout(this.obj+&quot;.down(&quot;+move+&quot;)&quot;,speed)
}
}
function MoveAreaUp(move){
if(this.y<0){
this.MoveArea(0,this.y-move)
if(loop) setTimeout(this.obj+&quot;.up(&quot;+move+&quot;)&quot;,speed)
}
}

function PerformScroll(speed){
if(initialised){
loop=true;
if(speed>0) objScroller.down(speed)
else objScroller.up(speed)
}
}

function CeaseScroll(){
loop=false
if(timer) clearTimeout(timer)
}
var initialised;
function InitialiseScrollableArea(){
objContainer=new ConstructObject('divContainer')
objScroller=new ConstructObject('divContent','divContainer')
objScroller.MoveArea(0,0)
objContainer.css.visibility='visible'
initialised=true;
}
// end absolutely positioned scrollable area object scripts

</script>

as for the second one. want you need is four images of numbers for the counter and layer them over the image you want it to appear as if it is a part of. You cannot mandate productivity, you must provide the tools to let people become their best.
-Steve Jobs
admin@onpntwebdesigns.com
 
forgot the second half of that example on the scroller.
here it is
<body bgcolor=&quot;999999&quot; onLoad=&quot;InitialiseScrollableArea()&quot;>


<!-- begin absolutely positioned scrollable area object-->
<div id=&quot;divUpControl&quot;> <a href=&quot;javascript:;&quot; onMouseOver=&quot;PerformScroll(-7)&quot; onMouseOut=&quot;CeaseScroll()&quot;>[scroll
up]</a> </div>
<div id=&quot;divDownControl&quot;> <a href=&quot;javascript:;&quot; onMouseOver=&quot;PerformScroll(7)&quot; onMouseOut=&quot;CeaseScroll()&quot;>[scroll
down]</a> </div>
<div id=&quot;divContainer&quot;>
<div id=&quot;divContent&quot;> <b>Scroll Area Content Start</b>
<p> Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy
eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.</p>
<p>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum
soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim
placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend.
Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe
eveniet ut er repudiand sint et molestia non este recusand.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy
eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.</p>
<p>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum
soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim
placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend.
Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe
eveniet ut er repudiand sint et molestia non este recusand.</p>
<b>Scroll Area Content End</b> </div>
</div>
<!-- end absolutely positioned scrollable area object -->

this is also form
if you need assistance with it You cannot mandate productivity, you must provide the tools to let people become their best.
-Steve Jobs
admin@onpntwebdesigns.com
 
Hi,

That script is good, however, it doesn't work properly on Macintosh's Internet Explorer 5.x+ The <DIV> scrollable area does not position properly. That script is not complete. I am anxious to find an answer/solution to this problem.

Hope this helps!
greenjumpy.gif
NATE
design@spyderix-designz.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top