View Full Version : were I am going

02-06-2007, 08:58 PM
I wasnt to display a message when the user types a URL

that reads "You are going to XX-Var NewSireName-XX"

so far I have

// HTML Code

<body onUnload="UnLoad()">

// Js Code

function UnLoad(){
alert(document.location); // returns my current web site

02-07-2007, 07:54 AM
Am I understanding correctly???

Are you wanting to make your site rigged up so that the user cannot leave?

or are you just wanting a message to appear when they do leave?

What kind of message are you wanting? Would a js alert do?

We need more info to help


02-07-2007, 08:26 AM
This is for a javascript (js) alert...you can add many more messages, or have them all say the same message if you wish... if you don't want the second alert message, delete it from the script.

alert("You are going to XX-Var NewSireName-XX");
alert("message 2 goes here");

return true;
This is the body of your website.

Or you can try this... it opens a new popup window of the same webpage the user was viewing when they closed their browser to get out of it.

<title>HA HA! Your Stuck!</title>

<script type="text/javascript">

function goodbye(){


<body onunload="goodbye()">
Your website content goes here.
Oh, By the way...YOU ARE STUCK. HA HA HA!

Hope one of these are what you were looking for...