Foros del Web » Programando para Internet » Javascript »

la url soporta el onclick

Estas en el tema de la url soporta el onclick en el foro de Javascript en Foros del Web. yo lo puse asi @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código Javascript : Ver original < li >< a href = " javascript :void(0)" class = "mover_letra_de_li"     ...
  #1 (permalink)  
Antiguo 13/12/2011, 02:23
Avatar de jor_0203  
Fecha de Ingreso: octubre-2011
Ubicación: mexico
Mensajes: 760
Antigüedad: 12 años, 5 meses
Puntos: 8
la url soporta el onclick

yo lo puse asi
Código Javascript:
Ver original
  1. <li><a href=" javascript:void(0)" class="mover_letra_de_li"
  2.               onClick="javascript:mi_funcion('contenido_a_mostrar');" >Cursos de Matematicas</a></li>
y despues asi
Código Javascript:
Ver original
  1. <li><a href=" javascript:void(0)" class="mover_letra_de_li"
  2.               onClick="mi_funcion('contenido_a_mostrar')" >Cursos de Matematicas</a></li>


esto es lo que me dice
pero si se fijan me maraca con rojo las comillas
que puedo hacer
mil gracias
Error Line 207, Column 23: there is no attribute "onClick"

onClick= "javascript:mi_funcion('contenido_a_mostrar');" >Cursos d…



You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.




NOTA MUY IMPORTANTE, SOLO LE QUITE LA MAYÚSCULA Y ME PASO LA VALICADACION PERO PREGUNTO ESO ES CORRECTO
ME PODRIAN DAR DE SUS COMENTARIOS
onclick

Última edición por jor_0203; 13/12/2011 a las 02:51
  #2 (permalink)  
Antiguo 13/12/2011, 03:24
Avatar de caricatos
Moderador
 
Fecha de Ingreso: abril-2002
Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años
Puntos: 1284
Respuesta: la url soporta el onclick

Hola:

Debes poner siempre los manejadores de evento en minúsculas todas las letras (es lo correcto)... poner alguna mayúscula es un vicio del pasado, creo que así generaban el código algunos programas editores web...

Sobre el código, si lo que quieres es lanzar una función, me parece que lo correcto no es usar un enlace, sino cualquier otro tag, como el span... y si lo haces por la mano, puedes usar el estilo que la pone (cursor: pointer).

Saludos
__________________
Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo
  #3 (permalink)  
Antiguo 13/12/2011, 08:55
Avatar de zerokilled
Javascripter
 
Fecha de Ingreso: abril-2009
Ubicación: Isla del Encanto, La Borinqueña [+>==]
Mensajes: 8.050
Antigüedad: 15 años
Puntos: 1485
Respuesta: la url soporta el onclick

saludos...
Cita:
NOTA MUY IMPORTANTE, SOLO LE QUITE LA MAYÚSCULA Y ME PASO LA VALICADACION PERO PREGUNTO ESO ES CORRECTO
ME PODRIAN DAR DE SUS COMENTARIOS onclick
es simple, se debe a que estas usando xhtml. xhtml, a diferencia de html, es sensible a minúscula/mayúscula. entonces, como indica caricatos, la norma general en xhtml es que todo se escribe en minúscula: elementos y atributos.
__________________
la maldad es una virtud humana,
y la espiritualidad es la lucha del hombre contra su maldad.

Etiquetas: funcion, onclick, url
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:25.