Question

Controllable scrolling

Asked by: Gurin

I need controllable scrolling script to scroll one layer inside of other (or one but clipped layer) to up and down, compatible with IE. Scrolling should be controlled in both direction (up and down) like this workable version for NN:
http://www.adm.kiev.ua/marquee.html

I'll give theese points for workable wersion for IE.
If your script will be universal for both IE and NN I'll increase points to 700.

Best Regards
Gurinn

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2000-08-17 at 08:39:59ID11033101
Tags

controllable

Topic

JavaScript

Participating Experts
2
Points
700
Comments
8

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Vertical Scroll in IE, but not NN
    The following html will display the vertical scroll bar, if necessary, in IE, but not in NN. There is a similar question dealing with a scroll bar not appearing in NN (Title: "ie scroll and not netscape"). It deals with frames and doesn't seem to apply to this sit...
  2. Iframe & NN?
    Ok I have some Iframes that don't work in NN but work in IE, is there a way around this using IFRAME?
  3. Scrolling a layer
    i want to be able to scroll the contents of a layer on my html page using links to control the movement there for not needing the use of a scrollbars: What i attempted to do is the following: <HTML> <head> <style> .temp{ position: absolute; width: 200px; h...
  4. layer with scroll
    I create a layer in an html page, I used the property overflow=scroll as I need to display the content of a table that can change its size. The problem is: it works perfectly with IE, but Netscape doesn't display the scrollbars. Is there a way to build scroll with Javascript...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: CJ_SPosted on 2000-08-17 at 09:18:48ID: 3969175

Okay, the following is what I always use (I copied and pasted it from a project I made a while ago...and deleted what wasn't necessary).
It consists of 3 pages. One html page, a js file...and a css file...here they are:

The HTML file:

<html>
<head>
<title>Dynamic</title>
<LINK REL="stylesheet" TYPE="text/css" HREF="hbd2.css">
<script src="ContentPro.js"></script>
</head>

<body bgcolor="#FFFFFF" background="images/bg_content.jpg" onLoad="scrollInit();">
  <div id="divCont">
      <div id="divScroll" class="clScroll">
            <table border="0">
                  <tr>
                  <td width="10"></td>
                  <td>e-Commerce breekt door in Europa en verandert de economie in een e-Economie. Wat gaat dit betekenen voor de Nederlandse detailhandel? Hoe ziet het speelveld eruit, wat zijn de spelregels, wie zijn de spelers en welke strategieën kiezen zij?<br><br>
                              Met dit trendcongres willen het HBD en VEDIS voorbeelden laten zien en handvatten aanreiken aan beslissers in en om de detailhandel, zodat zij op de nieuwe ontwikkelingen kunnen inspelen.<br><br>

                                    De inhoud van het programma is gebaseerd op onderzoek dat in opdracht van het HBD is uitgevoerd door Andersen Consulting en EIM. Op basis van dit onderzoek is een visie ontwikkeld hoe de e-Economie de detailhandel op korte en langere termijn zal veranderen.<br><br>

                                    Op het congres heeft de Amerikaanse retail consultant Sanford Stein als keynote speaker een inspirerende lezing gehouden over het 'opnieuw uitvinden' van de detailhandel in de e-Economie.<br><br>

                                    Daarna heeft Mark Hillen van Andersen Consulting de resultaten van het onderzoek naar de detailhandel in de e-Economie gepresenteerd. Hier zijn de gevolgen van de e-Economie voor de detailhandel aan bod gekomen. Mark Hillen is tevens ingegaan op verschillende bedrijfsmodellen en strategieën die detaillisten kunnen helpen bij het benutten van kansen in de e-Economie. Zowel succes- als faalfactoren van e-Retailing zijn aan de orde gekomen.<br><br>

                                    Na de pauze, waarin de deelnemers via een beleggingspel hun voorkeur voor één van de drie basisrollen van de e-Economie hebben aangegeven, is er onder leiding van Felix Meurders een levendige paneldiscussie gehouden. Vier bedrijven, die de drie basisrollen van de e-Economie min of meer vertegenwoordigen, hebben hun ervaringen met de bedrijfsmodellen van de e-Economie uitgewisseld. Aan het panel hebben deelgenomen: Fer van der Plas van Macintosh Retail Group, Carla Beijsens van Be Dressed, Maarten Buikhuisen en Kay Formanek van ePearle en Ernst Bökenkamp van Letsbuyit.com.<br><br>

                                    Het HBD/VEDIS Trendcongres 2000 richt zich op:<br>
                                    <li>      Functionarissen van koepels en brancheorganisaties in de detailhandel</li>
                                    <li>      Beslissers bij inkooporganisaties en grootwinkelbedrijven</li>
                                    <li>      Ondernemers die (nog niet) actief zijn op het gebied van e-Retailing</li>
                                    <li>      Makelaars en projectontwikkelaars</li>
                                    <li>      Marketeers
                                    <li>      Adviseurs in de zakelijke en financiële dienstverlening</li>
                                    <li>      Docenten in het retailonderwijs</li>
                                    <br>
                                    Bezoekers van het HBD/VEDIS Trendcongres 2000 vinden hier informatie over het door hen bezochte congres.

                                    </td>
                              </tr>
                        </table>
                  </div>
            </div>



            <div id="divControl">
                  <table width="465" height="320" border="0" cellpadding="0" cellspacing="0">
                        <tr height="140">
                              <td width="26" height="110" valign="top">
                              <a href="#" onmouseover="scroll(2);" onmouseout="noScroll()" onmousedown="scroll(5);" onmouseup="noScroll();">
                              <img src="images/pijl_omhoog.gif" name="Button" border="0"></a>

                        </td>
                        </tr>
                        <tr height="25">
                              <td width="26" height="25"
                              >
                              <a href="#" onmouseover="scroll(-2);"  onmouseout="noScroll();" onmousedown="scroll(-5);" onmouseup="noScroll();">
                              <img src="images/pijl_omlaag.gif" name="Button1" border="0"></a>
                        
                        </td>
                        </tr>
                  </table>
            </div>
</body>
</html>






THE JS FILE called ContentPro.js


ie=document.all?1:0
//n=document.layers?1:0
n=(navigator.appName=="Netscape")?1:0

//The speed of the initial timeout between each scroll.
timSpeed=10

//The increase in speed after each scroll.
timDelta=2

//The height of the container (change this when it scrolls to much or to little)
contHeight=250;


function FillDiv(Obj, Cases)
{
   var Str = n ? eval("document.layers['" + Obj + "']") : eval("document.all['" + Obj + "']")
   Case = eval(Cases);
   
   var HTMLStr = "<br><table border=0>";
   for(i=0;i<Case.length;i++)
   {
       HTMLStr += "<tr><td><img height=1 width=10 src='images/spacer.gif'></td><td><a href='" + Case[i++] + "'>" + Case[i] + "</a></td></tr>";
   }
   HTMLStr += "</table>"
   
   if(n)
   {
       Str.document.open("text/html", "replace");
       Str.document.write(HTMLStr);
       Str.document.close();
   }
   else
       Str.innerHTML = HTMLStr;
}

/*********************************************************************************
Object Constructor...deze stelt de methoden en properties vast van de objecten
*********************************************************************************/
function makeScrollObj(obj,nest){
      nest=(!nest) ? '':'document.'+nest+'.'                                                            
      this.css=(n) ? eval(nest+'document.'+obj):eval('document.all.'+obj+'.style')
      this.scrollHeight=n?this.css.document.height:eval('document.all.'+obj+'.offsetHeight')                                          
      this.top=b_gettop                                                            
      return this
}
//Getting the top for the top method
function b_gettop(){
      var gleft=(n) ? eval(this.css.top):eval(this.css.pixelTop);
      return gleft;
}
//Variables
var scrollTim;
var active=0;
var scrollSpeed=0;

/*********************************************************************************
Scroll functie:
Kijkt welke kant op moet worden gescrolled, en of hij niet al op zijn maximale
positie is.
*********************************************************************************/
function scroll(speed){
      clearTimeout(scrollTim)
      if (scrollSpeed==0) scrollSpeed = timSpeed;
      way=speed>0?1:0
      if((!way && oScroll[active].top() > -oScroll[active].scrollHeight + contHeight) || (oScroll[active].top()<0 && way))
      {
            oScroll[active].css.top=oScroll[active].top()+speed
            scrollTim=setTimeout("scroll("+speed+")",scrollSpeed)
            if (scrollSpeed>timDelta) scrollSpeed -= timDelta;
      }
}

//Clears the timeout so the scroll stops, this is called onmouseout.
function noScroll(){
      scrollSpeed = 0;
      clearTimeout(scrollTim)
}
/*********************************************************************************
Veranderen van de actieve layer..verbergt de vorige layer en toont de nieuwe.
*********************************************************************************/
function changeActive(num){
      oScroll[active].css.visibility='hidden'
      active=num
      oScroll[active].css.top=0
      oScroll[active].css.visibility='visible'
}
/*********************************************************************************
Initialiseerd de pagina, roept de object constructor aan.
Hier kun je zoveel objecten aanmaken als je wilt.
*********************************************************************************/
function scrollInit()
{
      oScroll=new Array()
      oScroll[0]=new      makeScrollObj('divScroll','divCont')
      oScroll[0].css.visibility='visible'
}

function scrollInitTrendcongresProgramma()
{
      oScroll=new Array()
      oScroll[0]=new      makeScrollObj('divScroll1','divContTrendcongresProgramma')
      oScroll[0].css.visibility='visible'
}

function SH(Obj, VisStr)
{
    var Str = n ? eval("document.layers['" + Obj + "']") : eval("document.all['" + Obj + "'].style")
    Str.visibility = VisStr;
}




AND THE CSS FILE called hbd2.css

#divCont {       
            position: absolute;
            font-size: 10px;
            font-weight: normal;
            font-family: verdana;
            top: 50px;
            left: 22px;
            width: 454px;
            height: 270px;
            visibility: visible;
            clip:rect(0,475,270,0)
      }
      

#divControl
      {
            position: absolute;
            top: 30px;
            left: 490px;
            width: 30px;
            height: 310px;
            visibility: visible;
      }
      
#divScroll1 {       position: absolute;
            top: 0px;
            left: 0px;
            visibility: hidden
      }
      
      
..clScroll {       font-size: 12px;
            position: absolute;
            font-family: verdana;
            top: 0px;
            left: 0px;
            visibility: hidden
      }


ALL OF THESE TOGETHER SHOULD WORK.......

All you have to do is change the text, and it'll scroll for you.....if you need the scrolling area at another place you should  edit the #divControl and in that the positions..left, top etc....it's IE and NS compatible....

Regards,
CJ


 

by: CJ_SPosted on 2000-08-17 at 09:20:27ID: 3969215

btw, the url you showed did not work for me with IE 5.5.....so I kinda GUESSED that this was what you wanted....

Regards,
CJ

 

by: GurinPosted on 2000-08-18 at 05:14:53ID: 3978613

Dear CJ_S,

Please, don't get it like a 'Rejecting' of your anwer, because script seems potentially workable.

Just tested your script on several computers (mac & PC) on IE (4.5, 5.0) and NN (4.6, 4.72)
Result is next:
NN shows layer without scrolling (onmouseover, onmouseclick)
IE shows only two images with same result - no scrolling :(

I hope you can fix it and I'll give immeadetely A grad and 700pt (if it will work for both NN and IE), or 500pt - if it will be for IE

Best Regards
Gurin

 

by: CJ_SPosted on 2000-08-18 at 05:44:52ID: 3978923

It all worked for me, for both IE and NS...except for one browser on the Mac. IE 4.01.....which showed all the text but with scrolling...

NN all worked...I'm placing a test-site on the net somewhere so you can test it. But it worked for me...everywhere....

here's the site:

http://www.casema.net/~cjfamily/index.htm

Regards,
CJ

 

by: mclaeb01Posted on 2000-08-18 at 05:48:09ID: 3978977

worked for me

 

by: GurinPosted on 2000-08-20 at 22:59:44ID: 4004264

Dear CJ_S,

Now it's workable!
Please, make blind answer and will give you promised points and grads :)

Best Regards
Gurin

 

by: CJ_SPosted on 2000-08-21 at 00:08:35ID: 4004803

thnx!

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...