|
This is frame number two
This script will automatically scroll your left frame when scrolling your main frame. Unfortunately this script is not supported by NS6. Setting up the script This script is reasonably difficult to set up, so to simplify it, we have named the frames "one" (left small frame) and "two" (main frame - this one). When changing the script for use on your site, you will have to make sure you change the "frame names" to your frame names, these are these parts: parent.frames.one.document.body.scrollTop = document.body.scrollTop; parent.frames.one.document.body.scrollLeft = document.body.scrollLeft; } else if (ns4) { if (parent.frames.one.scrollbars.visible) { parent.frames.one.scrollTo(parent.frames.one.pageXOffset, pageYOffset); parent.frames.two.scrollTo(pageXOffset, parent.frames.two.pageYOffset); } else { parent.frames.one.document.layers[0].left = -pageXOffset; parent.frames.one.document.layers[0].top = -pageYOffset; Place this part of the script in the upper body or head of your main frame page (this one) Next - for NS to be able to scroll the frame, the contents MUST be in Layers, so in your left frame you must insert Layer tags IE: <layer> right after your opening body tag and close it at the end of your content. Creating a basic 2 frame frameset. Below is how to create a basic frameset (this is what is used here) <frameset cols=125,* frameborder="0" border="0"> <frame src=one.html name=one marginwidth=0 marginheight=0 scrolling=no> <frame src=two.html name=two scrolling=Auto marginwidth=0 marginheight=0 noresize=no> </frameset> If you have trouble with this script, visit Htmlforums and post your problem in the Client Side Scripting Forum. |