Hey I barely know any html: This is what I want to do, when someone comes to my website, and they try to exit out, a little box pops up saying something like "blah blah blah are you sure you want exit?" they click yes or ok and another box pops up saying something else ect ect. Thanks!!
You mean like DP uses when you log out? As far as I know, you need Javascript for that, and even then I think it would only work if the user clicked a "Leave this site" button"... I mean, there's nothing you can do if someone just types a new address in their address bar anyway... Such a box is much more useful in asking people if they're sure they want to log out, or if they're sure they want to leave a secure (https) page... and the message box is only triggered when they either click on a submit button or a link with Javascript. I don't Javascript so I don't know exactly what it would be, but something like: in the <head> of your page: <script type="text/javascript"> <!--//--><![CDATA[//><!-- function theywanttologout() { if ( somethingaboutclickingthelink== '1') { [b]I think 1 means "true" but maybe you just use "true"?[/b] alert('Are you sure you want to log out?'); return false; [b]<-- instead of this, you'll need something different so they can click OK and log out[/b] } } //--><!]]> </script> Code (markup): And if this is a <a href... that they're clicking, you'll need to have it be a NORMAL link so it works when there is no JS on the user's browser... <a href="whatever" rel="external">the link</a> Code (markup): And the Javascript will then need something like [b]after the "function theywanttologout()" line above[/b] if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=0; i<anchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") ... Code (markup): That tells the Javascript to look for a real anchor (so anything that is the tag called "a" and has an href, meaning it goes somewhere (kinda redundant unless you have a's which are only for inpage links like <a name="something"></a> Code (markup): ) and also has the rel="external" attribute... so when that a is clicked, then the rest of the Javascript runs and I dunno what the popup box code is but I'm sure it's floating out there on teh Interwebs. But, it will not come just from someone typing a new address... and I'm pretty much in agreement with the others, sticking that message on any of your normal outgoing links will drive hordes of angry villagers with pitchforks, torches and clubs your way. : )