Web Hosting Talk







View Full Version : DHTML help!!!!


Calintz
01-10-2002, 08:42 AM
I'm trying to get my page to scroll like this site which has custom graphics
http://shinra.nu/blank

Click on "Thespian Thief" and there'll be a pop-up window. Select INFO >> Background. The scroller is there.
I got the .js files and tried it myself but I can't make it work >_<. Please help.....
Or if there's other places where I can use this kind of script, kindly inform me. I'm forever grateful!

Lawrence
01-10-2002, 09:41 AM
Scrolling the window is easy enough, it's just:

WindowName.scrollBy(10);

(adjust the "10" to control the scroll amount, can be negative to scroll the window up).

Making the scroll bar itself is the hard part. What I'd suggest is just start with a couple of buttons, until you get it actually scrolling properly, and then worry about making the scrollbar look nice. Try something like this:

<form>
<input type="button" value="Up" OnClick="YOURWINDOWTOSCROLL.scrollBy(-10);">
<input type="button" value="Down" OnClick="YOURWINDOWTOSCROLL.scrollBy(10);">
</form>


(Disclaimer: Untested, and even worse, done from memory without reference :look: )

Calintz
01-10-2002, 11:19 AM
THe problem is, I can't see the text. Even when I view the sourcecode, the text is not there!! Now without the text, I don't know how it'll scroll >_< And miraculously, it does in that page @_@

Lawrence
01-10-2002, 11:22 PM
It's using a plug-in of some sort, or maybe just JavaScript writes, not sure exactly, as I didn't take the time to have a good look. But you don't need to copy exactly what they've got, you can start from scratch yourself, and it's probably better that way anyway.

All you really need is two frames. In one frame you stick the scrollbar to scroll the second frame. In the second frame you stick your content as regular HTML files.