How To Add Functions To Javascript onload Over Third Party Scripts; Playing Nice Cómo agregar funciones a lo largo de javascript onload tercero guiones; jugar Niza
As a javascript developer using onload often you will find that other script authors too love to use onload. Como desarrollador usando javascript onload a menudo se encuentra que otros autores script demasiado amor para uso onload. Unfortunately onload accepts a function name and your reassigning will prevent others from using onload. Lamentablemente onload acepta un nombre de función y su reasignación se impide que otros utilicen onload. Here is a script which allows you to use onload even when others have used it and without breaking their script. Aquí está un script que permite utilizar onload incluso cuando otros lo han utilizado y sin romper su guión.
The key idea is that you should be able to stack your function(s) above / below existing function call. La idea clave es que usted debería ser capaz de pila de su función (s) arriba / abajo existente llamada a función. Let’s look at the sample code below: Veamos el ejemplo de código siguiente:
I think I have well commented the code to make the script self-explanatory, but feel to ask questions. Creo que he comentado así el código para hacer el guión explica por sí sola, pero se sienten a hacer preguntas. The code has been tested on Firefox, Internet Explorer and Opera. El código ha sido probado en Firefox, Internet Explorer y Opera.
Filed under Filed under Browser Navegador , Firefox , Headline News Headline News , How To Cómo , Internet Explorer Internet Explorer , Javascript , Programming Programación , Web , Web 2.0 Web 2,0 , Web Services Web Services | |
| |
RSS 2.0 RSS 2,0 | |
Trackback this Article | este artículo |
Email this Article Enviar artículo
You may also like to read También puede leer |





February 7th, 2007 at 10:34 pm 7 de Febrero, 2007 a las 10:34 pm
Where is the sample code? ¿Dónde está el código de muestra?
February 8th, 2007 at 1:08 am 8 de febrero de 2007, a las 1:08 am
hi there, Hola,
I don’t see any code — I use firefox 1.5.x on windows. No veo ningún código - Yo uso firefox 1.5.x en las ventanas.
Thank you, Gracias,
BR,
~A ~ A
February 8th, 2007 at 3:09 am 8 de febrero de 2007, a las 3:09 am
Thanks for the catch. Gracias por la captura. I forgot to escape the <’s and >’s Me olvidé de escapar de la < 's y>' s
April 30th, 2007 at 5:44 pm 30 de abril de 2007, a las 5:44 pm
Thanks for the script! Gracias por el script!
October 26th, 2007 at 6:30 am 26 de octubre de 2007, a las 6:30 am
Great idea. Gran idea. I created a function, addEventHandler, that simplifies adding this technique to new Javascripts. He creado una función, addEventHandler, que simplifica la adición de esta técnica a los nuevos Javascript.
Thanks for addressing this issue. Gracias por hacer frente a este problema. It was a recent concern of mine. Se trata de una preocupación reciente de las minas.