Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Urgent- Need to change default alignment of scrollbar


Message #1 by Denise Williams <dwilliams@l...> on Tue, 29 Jan 2002 11:09:41 -0500
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1A998.ACBDF39C
Content-Type: text/plain;
	charset="iso-8859-1"

Thank you very kindly.  I'll try this.
 
Denise

-----Original Message-----
From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]
Sent: Wednesday, January 30, 2002 5:57 AM
To: javascript
Subject: [javascript] RE: Urgent- Need to change default alignment of scro
llbar


so many methods, properties, events... I forgot/wasn't aware of onscroll,
but that would save having to use setInterval
 
Presumably this is some kind of kiosk application so you don't have to worry
about different browsers, so assuming youre using IE5.5, this would be the
code in the frame that contains the scrollbar (not tested, just off the top
of my head)
 

<body onscroll="synchroScroll()">
 
function synchroScroll(){
    var oFrame = top.frames("main").document.body;
    
    oFrame.scrollTop = document.body.scrollTop;
}
 
I suspect whast this will do is that the right frame will scroll as soon as
you stop scrolling the left frame.  
 
Using setinterval would make it work in harmony, but would be a bit jerky
depending on how long an interval you set.   The shorter the interval, the
less jerky it would be, but the more resources would be devoted to this
process.  Another thing to be aware of with setinterval is that it can cause
memory leaks if the same page is displayed all day long, you would need to
run clearinterval several times a day (or refresh the page with a meta tag)
to avoid this.

-----Original Message-----
From: O'Hara, Elliott M [mailto:EMOHARA@k...]
Sent: 29 January 2002 17:32
To: javascript
Subject: [javascript] RE: Urgent- Need to change default alignment of scro
llbar


<body onscroll="thefunctionthatAlextoldyoutowrite()">

-----Original Message-----
From: Denise Williams [mailto:dwilliams@l...]
Sent: Tuesday, January 29, 2002 12:26 PM
To: javascript
Subject: [javascript] RE: Urgent- Need to change default alignment of scro
llbar


Not sure what you mean.  please elaborate/explain.
 
Denise

-----Original Message-----
From: O'Hara, Elliott M [mailto:EMOHARA@k...]
Sent: Tuesday, January 29, 2002 12:18 PM
To: javascript
Subject: [javascript] RE: Urgent- Need to change default alignment of scro
llbar


couldn't you just run it onscroll???

-----Original Message-----
From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]
Sent: Tuesday, January 29, 2002 12:14 PM
To: javascript
Subject: [javascript] RE: Urgent- Need to change default alignment of scro
llbar


You would need to write a function that synchronises the amont scrolled in
one frame with the amount scrolled in the other (window.pageYOffset for
Netscape, document.body.scrollTop for IE), then use setInterval() to run
this function every 100 miliseconds or so.  This wouldn't be the best idea
as it could slow down other client side function attempting to run at the
same time, and would have a kind of jerky response anyway.
 
Why do you need it on the left?  Are you writing a site for left-handed
people? ;-)

-----Original Message-----
From: Denise Williams [mailto:dwilliams@l...]
Sent: 29 January 2002 16:57
To: javascript
Subject: [javascript] RE: Urgent- Need to change default alignment of scro
llbar


Thank you for the info.
 
I was trying to figure out a way to maneuver around this.  Since I'm using
frames, is it possible to use the scroll bar from one window to scroll
another?
 
Any work around ideas you have would be greatly appreciated.
 
Denise

-----Original Message-----
From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]
Sent: Tuesday, January 29, 2002 11:51 AM
To: javascript
Subject: [javascript] RE: Urgent- Need to change default alignment of scro
llbar


All windows applications have the scrollbar on the right - its not possible
to change this

-----Original Message-----
From: Denise Williams [mailto:dwilliams@l...]
Sent: 29 January 2002 16:10
To: javascript
Subject: [javascript] Urgent- Need to change default alignment of scrollbar



Is it possible to change the alignment of a windows scrollbar within a 
frame from the default right alignment to align left?  If so please send
sample code. 

Thanks 
Denise 




________________________________________________________________________

Scottish Enterprise Network

http://www.scottish-enterprise.com


Headquarters Address & Contact Numbers


150 Broomielaw

5 Atlantic Quay

Glasgow

G2 8LU.

Tel: +44 (0) 141 248 2700.

Fax: +44 (0)141 221 3217


This message is sent in confidence for the addressee only.

It may contain legally privileged information. The contents are not to

be disclosed to anyone other than the addressee. Unauthorised recipients

are requested to preserve this confidentiality and to advise the sender

immediately of any error in transmission.






________________________________________________________________________

Scottish Enterprise Network

http://www.scottish-enterprise.com


Headquarters Address & Contact Numbers


150 Broomielaw

5 Atlantic Quay

Glasgow

G2 8LU.

Tel: +44 (0) 141 248 2700.

Fax: +44 (0)141 221 3217


This message is sent in confidence for the addressee only.

It may contain legally privileged information. The contents are not to

be disclosed to anyone other than the addressee. Unauthorised recipients

are requested to preserve this confidentiality and to advise the sender

immediately of any error in transmission.








________________________________________________________________________

Scottish Enterprise Network

http://www.scottish-enterprise.com


Headquarters Address & Contact Numbers


150 Broomielaw

5 Atlantic Quay

Glasgow

G2 8LU.

Tel: +44 (0) 141 248 2700.

Fax: +44 (0)141 221 3217


This message is sent in confidence for the addressee only.

It may contain legally privileged information. The contents are not to

be disclosed to anyone other than the addressee. Unauthorised recipients

are requested to preserve this confidentiality and to advise the sender

immediately of any error in transmission.





  Return to Index