Well, I tried your suggestion, but unfortunately it didn't work. I think it should be used a well known variable from outside the script, which remain after the script, such as the identity of the new window, so I was looking for a while, and wrote this: <script type="text/javascript"> function previewSelect(loc,id,fullname) { if (typeof(MyWin)== 'undefined') { MyWin = {}; }
if (typeof(MyWin[id])== 'undefined' || MyWin[id].closed) { MyWin[id]=window.open(fullname,id,'titlebar=no'); MyWin[id].moveTo(0,0); } else { // MyWin[id].location.href= fullname; MyWin[id].focus(); } } </script>
This script opens only ones those files, which have as extension as the browser opens in a new window, these files are typically images. But, if you click on a file which has an unknown extension (for the browser), you will get many dialog forms (to choose between the opening and downloading). The number of the dialog boxes is 2+n, where n is the number of the calling the previewSelect function, that equal the click on the file names after the last load the whole site/flash. So, is there a reason why calls the flash more and more that same script, and if it is, how can I bypass it?
Best, Róbert
|