473,466 Members | 1,395 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Browswer Window moving when opening a new window

Hi all,

I have a very long page with a lot of text.

Some of this content have links that open a new brower window with
more details. However, the new window opens, the original window goes
back to the top of the page which is annoying because then you have to
scroll down again to be where you let of.

Any ideas how to resolve that?

Thanks in advance for your help

A.S.
Jul 23 '05 #1
2 1125
Allan wrote:
Hi all,

I have a very long page with a lot of text.

Some of this content have links that open a new brower window with
more details. However, the new window opens, the original window goes
back to the top of the page which is annoying because then you have to
scroll down again to be where you let of.

Any ideas how to resolve that?


Yes, return false from your onclick handler:

<a href="page.html" onclick="functionName();return false">Your text</a>
Jul 23 '05 #2
*Allan* wrote:
Hi all,
Hello
I have a very long page with a lot of text.
Sidenote: I hope it makes good use of nested headings so that those
folks with screen readers can easily skip sections.
Some of this content have links that open a new brower window with
more details. However, the new window opens, the original window goes
back to the top of the page which is annoying because then you have to
scroll down again to be where you let of.

Any ideas how to resolve that?


You could fix the problem at its source and not open a *new* window
(K.I.S.S.) Otherwise check out <URL: http://jibbering.com/faq/#FAQ4_24>
and the part about a graceful fallback for clients without javascript -
in your case it's likely that you've a '#' in your href and you're
missing the 'return false;' statement mentioned in the FAQ there.

Sidenote: The success of any popup function is determined by the type of
pop-up blocker that the user may or may not have installed. If the user
has a javascript capability and it's enabled, but also has a
particularly dumb pop-up blocker (perhaps on a corporate firewall), then
the pop-up function may execute and return without erroring but without
actually opening the desired new window. Unfortunately then the 'return
false;' cancels the browsers default event behaviour for hyperlinks and
doesn't navigate to the original href, leaving the user 'clicking' a
link and getting neither the pop-up nor the fall-back href.
--
Andrew Urquhart
- FAQ: www.jibbering.com/faq/
- Contact me: http://andrewu.co.uk/contact/
- This post is probably time-stamped +1 hour - blame my ISP (NTL)
Jul 23 '05 #3

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

Similar topics

10
by: Marshall Dudley | last post by:
When I do the following line in Netscape, the popup loads as it should, but the parent window usually, but not always, reloads as well. <a href="#"...
17
by: Applebrownbetty | last post by:
Hi, I'd like to append/amend the following code from the Dreamweaver extension "Open Picture Window Fever" for the ability to center the PopUp window: By default, it allows the window to be...
6
by: David Hayes | last post by:
juglesh <juglesh@nospamRadioKDUG.com> wrote in "Re: how to maximize the browser window that fits the monitor size?" (Saturday, January 01, 2005 3:12 AM): > > >I want to maximize the browser...
4
by: JeffP | last post by:
I want to add a short-cut to a windows app similar to launching from a windows run line a New window, to prevent changing an existing browser window from moving off a current logged in session...
3
by: anonieko | last post by:
You can try this code: > > > > > <!--- filename: mypage.html ----> <html> ....blah blah blah <script language=JavaScript src=/Javascript/center.js></script>
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
2
by: ScriptNFool | last post by:
I need to offer a list of files for download that are Images. Is there a way to put a link or javascript something in, so the file is offered as a file, and not interpretted by browswer as a file...
3
by: Zammy | last post by:
I have a database on a server that many people access repeatedly during the day. I have set up the switchboard form with code to minimize the database window, but when I try to open the database...
4
by: Eddie | last post by:
I am opening a windows (well, technically a greybox() call GB_show() which shows a nicer window than normal), and want to wait until that window is closed before moving to the next command. ...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
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,...
0
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...
0
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...

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.