hei guys,
I need to make this up, I have three iFrames on my page FRAME_1, FRAME_2 and FRAME_3, and I need to know how to make both FRAME_1 AND FRAME_2 scroll when scrolling FRAME_3 using its scroll bar...
some one can help me?
hei guys,
I need to make this up, I have three iFrames on my page FRAME_1, FRAME_2 and FRAME_3, and I need to know how to make both FRAME_1 AND FRAME_2 scroll when scrolling FRAME_3 using its scroll bar...
some one can help me?
I don't think there's a scroll event handler, so we'll have to poll this one.Code:<script type="text/javascript"> function checkScroll() { var controlElement = document.frames['FRAME_1']; var xoffset = (document.all) ? controlElement.document.body.scrollLeft : controlElement.pageXOffset, yoffset = (document.all) ? controlElement.document.body.scrollTop:controlElement.pageYOffset; document.frames['FRAME_3'].scrollTo(xoffset, yoffset); document.frames['FRAME_2'].scrollTo(xoffset, yoffset); } window.setInterval("checkScroll()", 200); </script>
Last edited by Twey; 03-08-2006 at 08:47 PM.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
ohh man... that's perfect... its all that I need... Thank you so much... u helped me a lot man... woks more than perfect... thank u very much...Originally Posted by Twey
Alex.
Thank you very much..i was in need of this script
Bookmarks