473,662 Members | 2,666 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.lin ks.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 1854
"HGJS" <HG*********@ma il.forum4design ers.com> wrote in message
news:HG******** *@mail.forum4de signers.com...
<snip>
Posted via http://www.forum4designers.com


form4designers. com is a bad place to read comp.lang.javas cript 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.

forumj4designer s.com is also a bad pace to ask javascript questions from
because their misrepresentati on 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.c om (who also
provide extensive and flexible archive searching facilities). But the
best method of reading and posting to comp.lang.javas cript 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 intranet address was http://intranet_01 If I wanted all of the links on a page that were linked to files withi the intranet to open in a new window, would I place a piece of cod like this at the top of the page:
6
8849
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 redirects to my page. Lately some other departments have been creating their own web pages and I have added links to them. The pages are on the same server, but different folders (traversing the root folder). These bright young people have introduced...
1
1866
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 intranet there are links, which a certain group of users can use. How do I implement such a scenario using the security provided by the dot net framework? Can anyone guide on how to implement in dot net Than Prasad
0
1244
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 he/she is prompted and logs on and authorisation takes place and he gets redirected to the page depending on the GROUP/ROLES they belong to in the active directory. On the pages they have treeview webcontrol as a menu structure and the
4
6799
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
2803
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 have been looking our asses off but can not find a working solution. the code we came up with is ...
4
5142
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 more and on asp.net site neither. since i saw that the portal was designed using webparts it seemed very usable for pusposes. anyone knows, where it dissapeared? --
2
2317
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 browser as a seperate window? We have our company intranet setup as a web page that fills the desktop (for ease of access and a standard corporate wallpaper look) but anytime anybody clicks on a form submit button or a web link, it opens their web...
9
1471
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 the same server but we will have two types of clients 1. web based, 2. intranet based. Is this possible? If so, what is it called in Microsoft speak? How to links would be appreciated. -- cheers, nuutuudnet
0
8435
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
8768
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...
0
8633
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
7368
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...
0
4181
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
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
2
1999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1754
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.