<script type="javascript">
document.write("<a href='javascript:fancy-xhr-request-routine()'>blah</a>");
</script>
<noscript>
<a href="static-page-that-doesn't-use-ajax">blah</a>
</noscript>
$(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>
Something like:But see that's my problem, ALL the data is just ajax'd from MySQL tables, there are no static files to link it, and what would be a point in making them if the whole point of the ajax was to avoid needing to do that :/Code: [Select]<script type="javascript">
document.write("<a href='javascript:fancy-xhr-request-routine()'>blah</a>");
</script>
<noscript>
<a href="static-page-that-doesn't-use-ajax">blah</a>
</noscript>
perhaps? or even just onclick events in the links to handle the javascript, return false; should prevent the browser from following the href= attribute. If JS support doesn't exist/is disabled the onclick events won't be processed, leaving the href= to be handled normally.
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'dYeah, that's a good point. I don't use jquery much so I forgot about that.
Following BlackBox's post, since you use jQuery, it's better to use event.preventDefault() in the event handler.
Like this:Code: [Select]$(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?
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).
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.It's given away for free, just like FF. What's the problem? ;)