JavaScript for Window Scrolling and Frame Scrolling
Tutorial 2
Bob Jensen at Trinity Unversity
Click Here to Return to the JavaScript Tutorial Menu

This document features frames and the JavaScript scroll(x,y)

Click here to view existing Window (with preset scroll = 340 pixels)
scroll this document down by 340 pixels (this is one of those JavaScript functions that will work in a Netscape browser but not in the Microsoft Internet Explorer browser --- sigh!)

 

Scrolled = 0 pixels right and 340 pixels down

 

Click here to scoll a document in a frame from a link in another frame
(The framed documents will appear in a new browser window.)

The cross-frame scrolling also appears to be a JavaScript utility that will work in a Netscape browser but not in the Microsoft Internet Explorer browser --- double sigh in frames!)

Possible Examination Question:
Since you can scroll among to documents in your web server with control(), why can't you scroll among documents that are in another web server and are not under your control.?

Possible Answer:
You can only declare bookmarks in documents that you control, although you might use (View, Source) to see if the author of the document added any bookmarks (these will have Name tags in HTML).

When you link to someone else's document, you cannot scroll down to any part of that document without a JavaScript scroll() function. Nor have I been able to get this to work when the docment in in a frame. It appears that the JavaScript must be in the document that is being scrolled even if you are linking to the scroll functin from another document in another frame.

 

 

Go to top of this document

Click Here to Return to the JavaScript Tutorial Menu

Java and JavaScript Operators and Expressions

Click Here for JavaScript References

Return to Bob Jensen's Main Index Page