473,804 Members | 4,269 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using scrollBy in conjunction with frames

I've been trying to get the scrollby javascript feature to scroll
through frames. My end goal is to make my own scroll buttons to use
for navigation through the frame but I figured I would start simple.
I would load a frameset and just move the correct frame by 100 pixels
right and 100 pixels down. Here is the code I am using:
<html>
<script TYPE="text/javascript">
function scrollme()
{parent.frames[1].scrollBy(100,1 00)}
</script>

<FRAMESET onload="scrollm e();" COLS="300,300,3 00">
<frame src = http://www.yahoo.com name="yahoo">
<frame src = http://www.google.com name="google">
<frame src = http://www.cnn.com name="cnn">
</frameset>
</html>
The line that really matters is of course
{parent.frames[1].scrollBy(100,1 00)} and I've seen (and tried) this
written many ways. It's got to be a syntax issue. I've tried:

parent.frames.y ahoo.scrollBy(1 00,100)
parent.frames.y ahoo.window.scr ollBy(100,100)
parent.frames[yahoo].window.scrollB y(100,100)

and more variants. I though maybe the function wasn't running so I
replaced my frames line with alert('Test!') and the msgbox came up.
Any ideas?

Sara
Jul 23 '05 #1
2 4989
your name here wrote:
The line that really matters is of course
{parent.frames[1].scrollBy(100,1 00)} and I've seen (and tried) this
written many ways. It's got to be a syntax issue. I've tried:

parent.frames.y ahoo.scrollBy(1 00,100)
parent.frames.y ahoo.window.scr ollBy(100,100)
parent.frames[yahoo].window.scrollB y(100,100)

<snip>

How about:

top.framename.s crollBy(100,100 );
top.frames[1].scrollBy(100,1 00);
Jul 23 '05 #2
Ivo
"your name here" wrote
<html>
<script TYPE="text/javascript">
function scrollme()
{parent.frames[1].scrollBy(100,1 00)}
</script>

<FRAMESET onload="scrollm e();" COLS="300,300,3 00">
<frame src = http://www.yahoo.com name="yahoo">
<frame src = http://www.google.com name="google">
<frame src = http://www.cnn.com name="cnn">
</frameset>
</html>


Cross-domain security measures prevent you from performing any action on
documents that are not from the very same domain as the document containing
the script. See for more info for example <
http://www.mozilla.org/projects/secu...me-origin.html >.
There is no workaround. If your page resides on Google, the above will work
because parent.frames[1] will contain a document from the same domain.
Otherwise, wait till your page shows up in their cache, and then try
again...
--
Ivo
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4857
by: Jawahar Rajan | last post by:
All, I have an ASP site that uses frames two frames. (yes I should be using include files, but we started ou using frames so we have been stuck with frames.) When I get a page expired warning (I am not caching pages) and a user clicks refresh from the menu bar the user is taken back to the home page! The home page is a frame with a top frame that is repeated on each subsequent asp pages
2
1300
by: Martin Mrazek | last post by:
Hi, can I manipulate with scroll bars by JS in HTML? Something like ------------------ frame1 button1: ToLeft button2: ToRight ------------------ frame2
1
5972
by: Phoenix | last post by:
I have a site that is supposed to be 'real-time' which has a frameset of 2 rows (the bottom row is 1 pixel so essentially invisible to IE users which is the requirement for the product). The bottom frame refreshes using an http-refresh every 15 seconds. If new data is available on the server, it tells the top page to refresh. For checks and balances, the top frame has a form at the bottom of the page with a 'clockBox'..which is essentially...
1
2169
by: JF | last post by:
Hi, I need to change the location of the parent window and after that scroll a little bit (because of "position:fixed" css buttons, which obscure the title). I have window.opener.location.href = "newhreflabel"; window.opener.scrollBy(0, -25);
0
1386
by: mookie | last post by:
m looking to create something similar to #region and #endregion using treeviews the problem is that instead of #region, i am using ;fold and ;endfold i am also allowed ot have a fold within a fold and that is where i am stuck. Private Sub rtb_TextChanged(ByVal sender As System.Object, ByVal e As
1
3939
by: Michi | last post by:
Hallo. I just try to implement a scrolling effect to a drag and drop script. If you try to drag something to an area beneath the visible area of your browser window, the window should scroll automatically downwards. Therefor i defined an area (i.e x-pos = 0px - 200px, y-pos = 500px - 600px), where the page should scroll, if you move the cursor in (while drag and drop (onmousemove)). While mousemove i check the coordinates and if they...
3
2994
by: vunet.us | last post by:
Hello, I have a floating div which I drag all over the page. I want to enable window.scrollBy function when div is dragged close to top or bottom of the page, so users would drag this div to the very top or bottom of the long page. However, when my page gets scrolled up or down, the div I drag with my mouse scrolls with page too, and I no longer hold the div. I added a functionality to change the top position of the div to be the same...
1
3486
by: vunet.us | last post by:
Hello JavaScript experts, I have a floating div which I drag all over the page. If the page has scrollbars and users drag the floating div to the very top, page scrolls up too. The problem occurs at this moment. As page scrolls up, the div gets detached from the mouse while dragging. How can I keep the floating div to always stay attached to the mouse during a dragging process and scrolling the page? Plug and Play code is a good example...
1
2970
by: ccy56781 | last post by:
http://codepad.org/MV3k10AU I want to write like next one. def conjunction(number=a,name=b,size=c): flag = a==b==c if flag: for e in zip(number,name,size): print e
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10076
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9144
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7616
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5520
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3816
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.