|
Posted by pcx99 on 02/08/07 15:59
STILL LEARNING wrote:
> On Feb 8, 6:36 am, pcx99 <x...@x.com> wrote:
>> document.onclick=function () {
>> document.location.href="http://someurl.com"; }
>
> pcx99, forgive my ignorance but . . . what is this? Javascript? It's
> quite elegant and I like it, but I'm not sure where it would go or if
> it might be fussy (eg cross-browser compatible).
>
> Very elegant, and this is easily the best solution -- both for
> simplicity and size -- but only if it is not fussy. Could you
> elaborate a bit? Does this go BEFORE the </HEAD> -or- AFTER the
> <BODY> tag? Thank you pcx99. :)
>
> SL'in
>
Yes this is javascript. It can go anywhere on your page. Here's the
full text you'll need to insert.
<script type="text/javascript">
document.onclick=function ()
{document.location.href="http://someurl.com";}
</script>
This will over-ride any other links you would have on the page. If the
user clicks anywhere, regardless of where or what he or she clicks it
will call this script (unless the user has javascript disabled, in which
case nothing would happen).
Sorry for not being clearer in the original post. I had not noticed it
was cross-linked.
--
http://www.hunlock.com -- Musings in Javascript, CSS.
$FA
[Back to original message]
|