1
JimLunsford
going to another site

I know that this isn't a XOOPS specific question but more of a general html question. I was wondering if there was a way to put code into each link that I have in my site that points to somewhere out of my site to have a page that says something like YOU ARE LEAVING MY SITE AND GOING TO ANOTHER then the user goes to the external site. Is this possible?

2
davidl2
Re: going to another site
  • 2005/6/24 19:05

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


I think the Javascript "unload" command can be used?

3
DonXoop
Re: going to another site

or point to a stand alone page on your site that contains a timeout and redirect (similar to the redirect pages of xoops). Your link would feed the external URL to the script.
no max no bling. goes double for mik. triple for the insane aliases of said lunatics
===========================
Not around here anymore. Way too many idiots, so sad.

4
m0nty
Re: going to another site
  • 2005/6/24 19:26

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


<head>
<
script language="JavaScript">

script>
head>

<
body bgcolor=#ffffff">
<a href="http://the site your redirecting to.com" onClick="GP_popupConfirmMsg('The message you want to use to inform your users they are leaving your site ');return document.MM_returnValue">site name herea
body>

5
JimLunsford
Re: going to another site

hmmmm.....

What I needed to do may be possible it seems by the replies but it would mean a lot of work. Each link points to a different area of the external site. So if the link was "shop" it points to externaldomain.com/shop and if the link was buy it would point to externaldomain.com/buy. There are 46 links total that I wanted to do this to so that would mean I would have to create 46 html pages each with different redirects. Well so much for an easy solution I guess.

6
Lance_
Re: going to another site
  • 2005/6/24 21:58

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


Not so, you would have the link get sent to 1 page in which in would say you message, in the url it would also send the link to that page, which after a predetermined amount of time, redirect to the external page.
GDL-Web.com :: Website development.
Xoopslance.com::Freelancing and Projects
thelionsden-arena.net:: Clan/League/Ladder Hosting

7
Mithrandir
Re: going to another site

You could also Google for pointers.
I found something, I think:
http://www.faqts.com/knowledge_base/view.phtml/aid/8570/fid/53

I don't know how to get the clicked-on URL, though, but it seems to be possible to run a javascript function when you click away from the page, so the real problem is finding out if the clicked link is an external one.
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

8
JimLunsford
Re: going to another site

Quote:

Lance_ wrote:
Not so, you would have the link get sent to 1 page in which in would say you message, in the url it would also send the link to that page, which after a predetermined amount of time, redirect to the external page.


That's just it.... 46 links on my page each pointing to 46 different links.

9
DonXoop
Re: going to another site

Quote:
JimLunsford wrote:
That's just it.... 46 links on my page each pointing to 46 different links.


Similar to how the XOOPS redirect page works you would simply pass the desired URL to the single script and it will take care of the redirect and countdown. No need for 46 different scripts, just one. One script and 46 different URLs (you're putting those links in anyway so the only thing different is the link).

I'm not doing the same thing as this but somewhat similar is that when I refer to the external URL of any of our site's partners instead of giving the direct URL I give the Partner module's URL for that partner. The user only sees the external page but it has already passed via the Partner module (xoops Partner, Smartpartner, whatever) and as such registers a click. This works great and requires nothing special, only a different URL link.
no max no bling. goes double for mik. triple for the insane aliases of said lunatics
===========================
Not around here anymore. Way too many idiots, so sad.

Login

Who's Online

489 user(s) are online (416 user(s) are browsing Support Forums)


Members: 0


Guests: 489


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits