I alredy do this and it work correctly, but when I try to load the page, in the navigator appear again the originally URL. So my question is how can I pass that URL to the navigator bar and show the document?, this is my code:
Expand|Select|Wrap|Line Numbers
- <script type="text/javascript">
- window.onload=function() {
- els=document.body.getElementsByTagName('*');
- for(c=0;c<els.length;c++){
- els[c].onclick=function(){
- getOnclicks(this);
- }
- }
- }
- function getOnclicks(el) {
- cadena=new String("?COLAB_CLICK=YES");
- if (el.tagName=="A") alert(el.getAttribute('href')+cadena);
- }
- </script>
Thanks everybody