Stop Auto Scrolling to Top - is there a script?
I'm autoring a CD using HTML files. From my NavigationPage I use JavaScript to open windows with embedded QuickTime movies.
My problem:
Each time the NavigationPage opens a new window it scrolls back up to the top. I want the NavigationPage to stay where it was.
Happens in both iExplorer and Netscape - Mac and PC.
Is there a script I can include to stabilize the page?
Thanks in advance.
Mark Hensler posted this at 07:20 — 20th December 2000.
He has: 4,048 posts
Joined: Aug 2000
put anchors in the popup HTML page
then in you javascript, when you open the page, use something like this:
winmdow.open("my_dir/my.html#anchor_name","window_name","")
Mark Hensler
If there is no answer on Google, then there is no question.
doren posted this at 09:59 — 20th December 2000.
They have: 100 posts
Joined: Sep 1999
Thank you Max.
But I think that script is for the new window the navigator window opens, isn't it?
What I need is a script for the old window that opens the new window.
Suzanne posted this at 20:54 — 20th December 2000.
She has: 5,507 posts
Joined: Feb 2000
http://www.zerocattle.com/examples/popUp.html
And if that doesn't meet your needs (it basically names the parent window, then the remote can open files in the parent window), then you can look up the tutorials at http://www.irt.org linked on that page for more information.
Word of caution, if you are linking to other people's pages, and they name the parent window, then your remote will break. It's best used for your own pages or at least pages you can control.
hth,
Suzanne
Suzanne posted this at 20:57 — 20th December 2000.
She has: 5,507 posts
Joined: Feb 2000
Re-reading the thread, the top issue would be best served by using the code similar to what I showed you in the above post. Specifically, by using onClick instead of javascript: you can kill the href (return false) so that *nothing happens* in the parent window.
I used to use and have the href go to #whatever before I learned that trick.
Anyway,
S
doren posted this at 00:22 — 21st December 2000.
They have: 100 posts
Joined: Sep 1999
Very nice of you to spend the time to help me.
I'm not very good at coding but I think this still misses the point.
1) the "navigator" window is a LONG list of windows I want to pop up with a QT movie embedded in it. When the viewer is done they close the popup window. The Navigator window never closes. The client then chooses another window/movie to popup.
2) if one scrolls down to the bottom of the "navigator" window and clicks on a pop up window it works fine. The popup window pops up in front of the navigator window. Unfortunately the "navigator" window then reverts to the very top of the page. When the viewer closes the popup window and returns to the Navigator window they must scroll all the way down to the bottom again. I want the "navigator" window to remain static at the place it was when the client popped up the popup window.
Suzanne posted this at 17:19 — 21st December 2000.
She has: 5,507 posts
Joined: Feb 2000
But for the record, I already answered this a couple of times now. The problem is that when you use some popup code, it doesn't cancel the signal to the parent ('navigator') page.
link will popup your window, and not finding the internal target, will snap the navigator page to the top. link will kill whatever is in the href. So the page doesn't move.
Alternatively, you can add anchors to each popup link, and have something like:
link
But I can't help (or hinder) any further without seeing your code.
Suzanne
Edited because I answered the wrong question the first time.
[Edited by Suzanne on Dec. 21, 2000 at 12:26 PM]
doren posted this at 18:53 — 22nd December 2000.
They have: 100 posts
Joined: Sep 1999
I'm not that great with code, I guess I overlooked or misunderstood the answer.
Thanks again
Suzanne posted this at 21:44 — 22nd December 2000.
She has: 5,507 posts
Joined: Feb 2000
Then someone would be able to clearly and easily pinpoint your problem and offer a solution you can cut and paste instead of understand.
Suzanne
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.