473,402 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Show an advisory "Going to External Link" while the user is going out of my domain

Hi,

I have my website and want to perform this functionality most likely using PHP. Please note that the website is huge and manual editing of pages is not possible.

Is there a quick solution tom implement an advisory or an intermediate message like "You are not leaving www.xxxxx. domain and going to external website" when a user clicks on any "external" link on my website?

Thanks,
AJ
Feb 8 '08 #1
3 1465
hsriat
1,654 Expert 1GB
Hi,

I have my website and want to perform this functionality most likely using PHP. Please note that the website is huge and manual editing of pages is not possible.

Is there a quick solution tom implement an advisory or an intermediate message like "You are not leaving www.xxxxx. domain and going to external website" when a user clicks on any "external" link on my website?

Thanks,
AJ
That can't be done in server side scripting.
You need to add some javascript code....

use something like this....

on ONCLICK event of every link, you may need to add this....

Expand|Select|Wrap|Line Numbers
  1. if (location.hostname!='yourwebsite.com')
  2. alert ('You are going out of my site, baby...');
I'm not sure about the syntax. Do confirm it.
Feb 10 '08 #2
That can't be done in server side scripting.
You need to add some javascript code....

use something like this....

on ONCLICK event of every link, you may need to add this....

Expand|Select|Wrap|Line Numbers
  1. if (location.hostname!='yourwebsite.com')
  2. alert ('You are going out of my site, baby...');
I'm not sure about the syntax. Do confirm it.
Oh, that means change all the files anyways. I hoped there was an easy solution. thanks a lot for your help. No issues with the syntax, with so many languages it has become a pain anyways to learn that.
Feb 10 '08 #3
Markus
6,050 Expert 4TB
Oh, that means change all the files anyways. I hoped there was an easy solution. thanks a lot for your help. No issues with the syntax, with so many languages it has become a pain anyways to learn that.
Are your pages served dynamically or file...ly ?
Feb 10 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Matt Adams | last post by:
As well known I could specify the text color in the body tag like: <BODY TEXT=WHITE LINK=WHITE VLINK=RED ALINK=WHITE> What I want to achieve now is that always (!) the text of the last visited...
6
by: Dave Patton | last post by:
Discussions in another thread, about the use of multiple "Top" links on a page prompted me to redo a page of mine: http://members.shaw.ca/davepatton/mapcompare.html was changed to:...
32
by: Fresh Air Rider | last post by:
Hi I understand that ASP.net 2.0 (Whidbey) is going to reduce coding by 70%. Surely this is going to de-skill or dumb down the developer's task and open up the task of web development to less...
10
by: Ian Lazarus | last post by:
Hello. How do "unresolved token" link errors occur. How do I fix them? Linking... LINK : error LNK2020: unresolved token (0A000015) ??_7type_info@@6B@ LINK : error LNK2020: unresolved token...
33
by: STILL LEARNING | last post by:
I'm not sure if this can even be done, but what prompts the question is my desire to be able to create an "Uber Link" script/code of some sort, such that even if the html page contains nothing but...
2
by: Gnus | last post by:
Hi all! I have a little(?) problem with external schema location... I'm using xerces/xalan (C++) for doing some actions with some set of xml-files. Some of these files must validating...
2
by: Thijs | last post by:
Hello, I´ve got a question regarding controlling an external app. I´m writing a vb.NET app that, at some point, needs to push a button in an external app. This external app has no API...
4
by: =?Utf-8?B?U0g=?= | last post by:
There seems to be an issue with .NET 3.5/Visual Studio 2008 (Team System). After convincing my company to create our latest project in .NET 3.5, this is kind of reflecting bad on me. Problem:...
3
by: adlloyd | last post by:
Hi all, I've got 4 servers running several instances (about 12) of an application. This application receives information from and external source and uploads it to a remote SQL Server database...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
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...

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.