473,651 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
+ 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 1141
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="functi onName();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
11217
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="#" onClick="window.open('/cgi-bin/displayimage.cgi?/store/demo/image.jpg&YOUR+PRODUCT%27<b>S+NAME+GOES', 'fullimage', 'WIDTH=420,HEIGHT=405,status=0')"> The original window should not reload, but is, and I have tested it with both version 4.72 and 7.02, and they both do it. IE does not do it....
17
2506
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 offset on the left and top, but does not include a centering option. I'm thinking it would include something like (screen.width-imageWidth)/2; somewhere but not sure how do go about doing this.
6
5632
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 window when I open a new window. > > function expand() { > window.moveTo(0,0); > window.resizeTo(screen.availWidth, screen.availHeight); > }
4
5970
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 to another web application. And, I'd like it to be a chromeless window, sans toobars and sized similar to a popup. TIA
3
5627
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
11071
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 window.open function? I would prefer not to create a separate HTML page. So far all I have is the basic var cwin = window.open('images/KJV-THANKS.gif', 'Thanks', 'width=243,height=420,'); cwin.focus();
2
307
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 to be displayed?
3
3257
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 window it opens off screen so far that I have to close the switchboard and go find the database window, open it and reopen the switchboard form. Is there any possibility of fixing the position of the moinimized database window relative to the...
4
11091
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. However, when I open the window, JavaScript immediately issues the next command statement. How can I get JavaScript to wait until the window is closed before continuing? Here's visually what I'm trying to do: statement1; GB_show('mycaption,...
0
8352
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...
0
8275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8802
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8697
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8465
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,...
1
6158
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
5612
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
4283
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1909
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.