Jump to content

Need to prevent users from leaving my site.


RussellReal

Recommended Posts

First, let me start by saying I'm not a porn site or a hacker.. So please no moral debate, I will explain exactly what I want it for in a moment.

 

Basically what I need is something that will listen for when a page starts loading, to cancel the loading and then load up a different page :)

 

Basically I have an iFrame which points to someone else's Java applet, I don't take credit away from them at all. That java applet if you click the close button, it will redirect the browser's top.location, instead of the frame that it is in.. Which then redirects the users away from my site..

 

I simply want to keep them on MY site until they navigate away from my page manually or if they close the browser.

 

thanks :)

Link to comment
Share on other sites

Well...I'm not entirely sure if this will work or not, seeing as how link is in a java applet and I'm not sure how java applets really behave...but you can try

 

<body onUnload="location.href=location.href;">

 

Though TBH, IMO it's still bad form to do something like this.  Better to get the owner of the java applet to change their code or cut them from your site.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.