Eliminar errores javascript en IE desde servidor (Geocities) Aunque un poco desfasado , pongo este post por si le puede ayudar a alguien la solución que adopte para evitar uno de esos fastidiosos mensajes que te lanza el IE, sobre todo cuando usas páginas alojadas en geocities.
Pongo el enlace aqui debajo y copia del texto por si acaso (english). Leer sobre todo la parte en negrita que va orientada a los que programan webs:
http://www.geocities.com/smsu_63/suppress-javascript-errors.html Suppressing JavaScript Errors on Free GeoCities Sites
There is a problem that can affect all free GeoCities sites. A user can create a site, carefully place all their text and images, and make sure there are no coding errors of any sort on the the page, but when someone visits the page and tries to view it using a web browser, they may see error messages concerning a "syntax error" or "runtime error". These are scripting errors that result from the advertising code that is inserted by Yahoo!'s servers every time they deliver a .htm or .html file to a visitor to a free GeoCities site. The servers select the code at random when the web browser asks for the page, and add the code either at the top of the file, or at the bottom or both. Sometimes there is no error at all, and the ad appears as it is supposed to. Other times there may be an error, such as a "Done, but with errors on page" message in the Internet Explorer status bar.
If you want to confirm what is happening, you can go to File Manager and inspect one of your pages using the built-in HTML Editor. If you look at your file using the HTML Editor, you will see it exactly the way it is stored on the GeoCities server; the "extra" code will not be there. (Remember, if you are a PageBuilder user, do not use the HTML Editor to save the page, because if you do, you will not be able to use PageBuilder to edit the page in the future.)
Note that the advertising code is added only for pages on a free GeoCities site. On paid sites, there is no advertising code added, but the server still adds some code, used for things like the visit counts and other statistics. On paid sites, no syntax errors normally result, but there is a price you pay for using a paid GeoCities or Yahoo! Web Hosting account: you will not be able to validate the syntax and structure of your HTML, because the added code does not follow all the rules.
So, on free GeoCities sites, how do we deal with this added code, and the random errors?
First, if you are using Internet Explorer to visit GeoCities sites, you will want to reduce the disruption that these errors cause to your web browsing. You need to use "Tools", "Internet Options", select the "Advanced" tab and make sure these two options are marked as shown below:
Disable script debugging=ON, Display a notification about every script error=OFF
Now, as someone who is creating pages on a GeoCities site, you will want to reduce the effect those errors have for people who visit your site.
The page you are viewing contains a script that will suppress many of these error messages. In fact, this page itself contains an intentional syntax error, and if you do not see one of those error messages now, that indicates that the special script is working.
This script has been tested to confirm that it does not interfere in any way with the functioning of the code that is inserted by the Yahoo! servers. This is not a script that will remove the advertising from a free GeoCities site. Its only purpose is to suppress JavaScript errors, syntax errors or runtime errors.
Installing this script in a page on a free GeoCities site will eliminate the effects of the syntax errors that are often present in the code added at the bottom of the HTML file by the GeoCities servers. On occasion, the servers place additional code at the top of the HTML file, not just at the bottom of the file, and when this occurs, any errors resulting from that code at the top of the page will still sneak through. Even so, adding this script to your page will reduce the instances in which visitors to your site will be annoyed by those pesky errors.
If you like the results of this script and would like to make use of it on your site, just select and copy the following code, and paste it into the head element of your HTML. If you are using GeoCities PageBuilder, select and copy the code, and use "Format", "Advanced Page Properties", then "Ctrl-v" to paste the code into the "Head Script" area.
<script language="JavaScript" type="text/javascript"> <!--
function stoperror(){return true}
window.onerror=stoperror
// -->
</script>
Of course if you make use of this script and also decide to use JavaScript code within your page, you will need to disable or remove the script in order to debug any new scripts you place on your page, or to check out the scripts if your users report problems with the effects on your page. |