Hi,
I put up an example of how you could attack the problem here:
http://www.resass.f2s.com/dynapi/Richard_Examples/Scrolling_a_Div.html
Note that you have to add enough <br>'s to the end of the div to make it
long enough. If you know the length you can simply specify it in the
setSize().

Cheers,
Richard Bennett

[EMAIL PROTECTED]
www.richardinfo.com
(Everything running on, and ported to the 19/12/2000 snapshot of DynAPI2)
Find the DynAPI faq here:
http://sourceforge.net/docman/display_doc.php?docid=656&group_id=5757
Browse the mailinglist here:
http://www.mail-archive.com/index.php3?hunt=dynapi

----- Original Message -----
From: "Greg Jacobson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 09, 2001 7:04 PM
Subject: [Dynapi-Help] Help with divs


> Hi. I have been trying to use dynapi to create a
> scroller.   I have a div that contains information and
> I want to have that info. scroll using up and down
> arrows.  As far as I can see, I cannot use viewport.js
> because I must keep the information in a div tag (I
> cannot set the text with a Label for example)  I have
> been trying a lot of different things but I cannot get
> any to work.  Here is an example of what I am trying
> to do.  Would someone please look at it and let me
> know if they have a solution?  Thanks very much for
> any help - I am new to the DynAPI.
>
> Greg
>
>
>
> <html>
> <head>
> <title>Inline layers</title>
>
>
> <script language="JavaScript"
> src="./src/dynapi.js"></script>
> <script language="Javascript">
> DynAPI.setLibraryPath('./src/lib/')
> DynAPI.include('dynapi.api.*')
> DynAPI.include('dynapi.ext.inline.js')
>
>
> DynAPI.onLoad=function() {
>
> DynAPI.document.all["testlayer"].setBgColor('#c0c0c0')
> DynAPI.document.all["testlayer"].setSize(60,60)
> DynAPI.document.all["testlayer"].moveTo(100,100)
> }
>
> function scrollUp( ) {
> alert( "I would like this to scroll the testlayer up"
> );
>
> }
> function scrollDown( ) {
> alert( "I would like this to scroll the testlayer
> down" );
> }
> </script>
> </head>
>
> <body>
> <div id="testlayer" STYLE="position: absolute">Testing
> inline
> layerssssssss<br><br><br>scroll<br>this<br>please<br></div>
>
> <a href="javascript:void();"
> onClick="scrollUp()">scroll up</a>
> <a href="javascript:void();"
> onClick="scrollDown()">scroll down</a>
>
> </body>
> </html>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
>


_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to