...

View Full Version : Not really a question but thought this might help



Darklord
12-30-2006, 03:13 PM
In some of the scripts here that work with right-click, youll notice a line like this:
<a href=\'#\' onmousedown=\'parent.window.location.href=\""+lnk+"\"\'><img src=\'"+ico+"\' width=\'16\' height=\'16\' class=\'ico\'> "+txt+"</a>

2 things, first is the href, In most cases, this will not bother you, but in some cases, youll notice it will send them to a link it will try. In some cases it is ok to leave blank instead of using a #(try it, if it works Great).

The other issue I see is the onmousedown. This particular section was grabbed directly from a right click menu script, after right clicking a few times on the page, IE got an error, couldnt read something. As Im not a Javascript guru, I dabble in it. I played with it, and finally got it fixed. I then replaced the onmousedown with window.onmousedown. And I can right click all day now. I hope this helps others as well.
Sorry to disapoint, This is not correct at all. It made it so that the onmousedown was not processed at all, and thats why it seemed to work. I do believe the error is due to memory leakage, but I cant be for sure. This is a script available on this site. If anyone can tell me what is going on and why I cannot seem to get a solution working, That would be great. I read in the part of this site that talks about memory leakage, and it seemed that the point was to reference things to a function if possible. Im not sure if I read that right and this is probably the second major attempt at fixing Javascript I have ever really attempted. I am no fool, php is the language of choice for me, but to me, Javascript has a lot of different functionality that the user would like.
Heres a link to this script Im playing with:
http://www.javascriptkit.com/script/script2/rightclickmenu.shtml

Thanks in advance.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum