Guys, not sure what to search for in order to get an answer for my query, so apologies if this has been answered before.

Essentially, on my site i have URL's to external sites. Whenever someone clicks on an URL pointing to an external site I want them to be directed to a temporary holding page (which will contain an advert) , after a five second delay the holding page will be refreshed so that it displays the content of the external URL.

Does anyone have any pointers on how this can be done?

I know i could use a meta-tag to do the refresh, but not sure how to get people to go to the holding page.

Any help would be much appreciated.

I'm not sure you can accomplish everything you want to do, but you should check out the JavaScript 'onUnload' event handler. It is placed in the body tag and is intended to run a JavaScript routine when someone tries to leave a page. I've seen it used for pop-ups.

Obviously, it will only work when a user has JavaScript enabled.

Hope that helps.

Atleast its an idea :)

I'll have a look into that.

Cheers

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.