473,508 Members | 2,342 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Intranet Links


Hi,
I want to place a piece of JavaScript at the top of my page/s that wil
tell all links on that page to open in certain target windows dependin
on the hostname.

Suppose the intranet address is http://intranet
so this means that the hostname is "intranet" right?
If I want all intranet page links to open in the same window but al
other links (ie external internet links) to open in a new windo
(_blank) then would I use something like below? Please correct an
place I've gone wrong:

if(document.links.hostname == "intranet") {
this.target = "_top";
} return true;

But somewhere in there I would also need an "else" statement to tell i
to open all other links in "_blank" target. Can someone please tell m
where that should be added in. I'm fairly new to javascript and am no
exactly sure what order some of this stuff should go in.

Thank

HGJ
-----------------------------------------------------------------------
Posted via http://www.forum4designers.co
-----------------------------------------------------------------------
View this thread: http://www.forum4designers.com/message46077.htm

Jul 20 '05 #1
1 1843
"HGJS" <HG*********@mail.forum4designers.com> wrote in message
news:HG*********@mail.forum4designers.com...
<snip>
Posted via http://www.forum4designers.com


form4designers.com is a bad place to read comp.lang.javascript from
because their presentation of the group garbles the Usenet posts it is
derived from and they only report a fraction of the posts made to the
group, giving an incomplete representation.

forumj4designers.com is also a bad pace to ask javascript questions from
because their misrepresentation of the group, combined with deliberate
deceptions about the nature of the service that they provide, have
resulted in a level of resentment of forum4designers.com that will
negatively impact on anyone who decides to associate themselves with
that web site.

Many other sites provide superior web-based access to Usenet, and often
without distortion or omission, including groups.google.com (who also
provide extensive and flexible archive searching facilities). But the
best method of reading and posting to comp.lang.javascript is through a
news server via newsreader software.

Richard.
Jul 20 '05 #2

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

Similar topics

1
317
by: HGJS | last post by:
I would like to place a single piece of JavaScript at the top of m intranet page/s to tell every link on that page to open in a certai target window, depending on the "hostname". Suppose my...
6
8837
by: James Owens | last post by:
I maintain a small web page for internal company use. People access it by typing "library" in their browser address bar; this defaults to "http://library" which the network admin magically...
1
1855
by: Prasad | last post by:
Hi, I am developing a local intranet application and will be using Windows authentication Dot net provides code access security and role-based security I am not very sure how to use them. On the...
0
1240
by: naijacoder naijacoder | last post by:
Here goes the scenario.. The intranet is using windows Auth integrated wih Active Directory. Which is fine and all the appropriate Roles/Groups are set. When a user clicks on a button on a page...
4
6791
by: Andrew | last post by:
Hey all, I would like to preface my question by stating I am still learning ASP.net and while I am confident in the basics and foundation, the more advanced stuff is still a challenge. Ok....
5
2792
by: Martin Heuckeroth | last post by:
Hi We are working on a webservice application and are having some problems with the cookies and/or sessions. We have them working on our intranet but then its not working on the internet. We...
4
5130
by: Darko Konrad | last post by:
hi guys, i'm about to build an companies intranet portal and i saw on couple of pages that there has been an intranet SK available for VS 2005 beta. In my version of VS2005 i cannot find it any...
2
2306
by: peridian | last post by:
Hi, Just a basic thing, if there is a web page saved on to your desktop using Active Desktop (WinXP Pro), how can you get weblinks to remain within the Active Desktop and not open up your web...
9
1467
by: =?Utf-8?B?bnV1dHV1ZG5ldA==?= | last post by:
We want to use allready written C sharp programs for our asp.net applications. The idea is that we write a program ONCE and use this same EXACT logic for our internet apps. Everything will run on...
0
7229
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
7129
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
7333
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,...
0
7398
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
7061
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
3194
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1566
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 ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
428
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.