473,672 Members | 2,650 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Target named anchor when opening window

HI,

I was wondering if it is possible to target a named anchor in a frame when
opening a new window with a javascript function? has anyone actualy been
able to do this?

Thanks in advance for your answer

Sean
Jul 20 '05 #1
1 3265
"John" <w> writes:
I was wondering if it is possible to target a named anchor in a frame when
opening a new window with a javascript function? has anyone actualy been
able to do this?


window.open("ht tp://www.foo.bar/dims.html#named AnchorName","ba z");

I.e., just as if you openend it with a link.

The global function "open" (a.k.a. "window.ope n") with two arguments
window.open("UR L","targetName" )
works just as clicking on the link
<a href="URL" target="targetN ame">CLICK ME!</a>
It is only if the target window/frame doesn't exist that the third
argument to "open" matters.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

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

Similar topics

3
4566
by: Lars Schlanbusch | last post by:
Hi! Is there any way to set <base target="_blank"> for links which link to a page outside the domain, and <base target="_self"> for links which link to a page inside the domain? Can i do such a thing in the global.asa file or maybe in an other include asp file? I am working on a site with 3-4000 hyperlinks, and I do not look forward to "marching" through every each one ove them and set target to _blank og _self...
12
3293
by: Romain | last post by:
Hi, I've used an excellent way to make target="_blank" links that still validate while using HTML 4.01 Transitional doctypes in the past. I learned the trick from : http://www.sitepoint.com/article/1041 Basically, instead of typing : <a href="yourlink.html" target="_blank" alt="">The link</a>
3
4214
by: Daniel Goldman | last post by:
When I open a new popup window, with a url that includes an anchor, about 1/5 of the time the page displays correctly (jumps to anchor), 4/5 of the time page displays incorrectly (starts from top). Here is the code I use: HelpWindow_j = window.open ('webpage.htm#uniqAnchor', 'uniqName', 'hotkeys,location,resizable,scrollbars,height=300,width=600', true); This happens in IE 6.0, not in NS 4.7; NS 4.7 works correctly. I have not tested...
16
3603
by: St. Rechsteiner | last post by:
Hi How i made the same effect in xHTML like the - target="_blank" - Tag in HTML 4.01? I will use it with xHTML and CSS ... but the validator say's to me, that this tag wasn't valid for xHTML! ... Why? Is there no "same effect"-Tag in xHTML? Thx for answers!
2
8044
by: sjp | last post by:
I need to open new windows only for the purpose of viewing linked images, maybe a dozen or so throughout the site. Using the Target="blank" command is quick, easy and seems like the best way to go. But if I use the javascript "open window" function, I know that I can size the new window to the exact size of the jpg image. But then I need to actually create pages for these windows and save them to my folder. With the target command, I...
36
3960
by: randau | last post by:
I would like to use the Link Target attribute, but am inhibited by the likelihood of a newly opened browser window completely hiding the Parent browser window. Thus offering the illusion that you're still in the same browser, but the Back Button no longer works. I've done some experimentation and came up with the conclusion that Microsoft's IE browser has a relatively small likelihood of that happening, but that Netscape's browsers...
8
3853
by: msnews.microsoft.com | last post by:
I want to redirect the user to a url outside of our website but I want it to preserve our application's window by opening a new window. We have a datagrid that has five hyperlink columns containing links to external sites. The hyperlink columns have the target="_blank" attribute so they preserve the existing window. This works OK except that the NavigateURL's are quite long due to the size of the query string and this makes the page slow. ...
3
4516
by: Joseph Gruber | last post by:
Hi all -- I have two questions. First, I'm adding a control to my form at runtime and the control/form seems to ignore the anchor property of the runtime control. Any idea how I can get a runtime control to anchor properly? Second -- the program I'm writting is supposed to look like a dos application (long story). When the application is "Normal" aka a small window then everything looks great. But when I resize the window to...
92
5130
by: Erwin Moller | last post by:
Hi group, I encoutered page validation error, but I don't know a way around. The page has the following doctype: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> Some hyperlinks need to open to a new window, so I used the (wrong) target="" attribute.
0
8500
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
8418
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
8943
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
8695
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
7465
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
6254
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
5719
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
4437
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2835
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.