Hm.. is it me or do ID's with spaces in them not work? I tried: "OPU Thre" (as the last "ad" was cut off).. but that 404'd
Following BlackBox's post, since you use jQuery, it's better to use event.preventDefault() in the event handler.
Like this:
$(document).ready(function(){
$("#static_page").click(function(event){
alert("This link no longer goes where it's supposed to go! Isn't that brilliant?");
event.preventDefault();
});
});
<a id="static_page" href="static-page-that-doesn't-use-ajax">blah</a>
A bit off topic, but BlackBox, what's so bad about magic_quotes?
Yeah, that's a good point. I don't use jquery much so I forgot about that.
And yes, IDs and classes are supposed to be one word (spaces would goof up the syntax of the CSS file cause it allows selectors specifying the style for specific elements of a certain class / ID, or within a div of said class/ID).
As far as the creating static pages go, you could just have the regular links link to the "outer" page and pass some kind of param which will include() the ajax'ed page within the body of the outer page. (But it looks like you have it figured out).
With regard to magic quotes, (and even the developers of PHP say this, hence magic quotes is a deprecated feature currently), it's a bad idea to rely on "built-in" security measures that you may not be aware of happening. (It's important for the developer to be aware of the attacks that can happen, and perform input validation properly themselves).
In addition it causes applications to require code that check for magic_quotes_gpc or magic_quotes_runtime and stripslashes() if needed.
IE may be sort of ok (is usable, if you don't mind certain security risks), but the way it is (or at least used to be) marketed is not.
I wouldn't say it is full of security holes in the latest versions of IE. It by default takes a pretty decent approach to allowing activeX controls to run and forces you to "allow" them before they run (of course the user can be dumb and just 'allow' everything but this can be a problem in any browser, not just IE.. on firefox you could try to get the user to install an xpi (extension) and it could be just as bad).
The main reason I use firefox instead of IE is because of all the browser extensions that I use (adblockplus which blocks and collapses the div for most major ad companies' ads; noscript which as mentioned maintains a whitelist of javascript/flash/etc. enabled sites; greasemonkey and firebug; among certain other plugins for web apps I have to use that do not work at all in IE).
Finally, with regard to things like users that are on old or "incompatible" browsers, I wholeheartedly agree that they should upgrade to the latest version of the browser if possible but this isn't possible in all cases, or the user just won't do it. (I know for example there are a lot of company IT policies where they are still using windows XP and IE 6, oftentimes since they have some ancient webapp that only works properly on this browser. As such the user cannot use another browser).
You need to also consider where the user will disable javascript on sites where it's not really needed (me), or clients where javascript support may not exist (for example mobile devices like cell phones, PDAs, etc). I can understand the use of javascript for "special" features, for example a realtime chat feature using AJAX techniques to send and receive chat messages, but for simple navigation of pages in your case it should not require ajax, at that point it is just being used as an annoying gimmick).
A good example of a major website that takes the use of Ajax too far is Facebook. Every single page request is an XHR (also ever since they started doing things this way I've found the site to be extremely buggy. I'm sure it's an attempt at reducing load on their servers as they can load parts instead of the whole page, but it doesn't work very well IMO)