Foros del Web » Programando para Internet » Jquery »

Asociar javascript con jquery

Estas en el tema de Asociar javascript con jquery en el foro de Jquery en Foros del Web. Hola tengo el siguiente codigo, @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código Javascript : Ver original < script LANGUAGE = "JavaScript" > function confirmDel ( url ) { //var ...
  #1 (permalink)  
Antiguo 05/03/2013, 14:17
Avatar de dvbeaumont  
Fecha de Ingreso: marzo-2011
Ubicación: Caracas
Mensajes: 145
Antigüedad: 13 años
Puntos: 1
Exclamación Asociar javascript con jquery

Hola tengo el siguiente codigo,


Código Javascript:
Ver original
  1. <script LANGUAGE="JavaScript">
  2. function confirmDel(url){
  3. //var agree = confirm("¿Realmente desea eliminarlo?");
  4. if (confirm("¿Realmente desea eliminarlo?"))
  5.     window.location.href = url;
  6. else
  7.     return false ;
  8. }
  9. function confirmEdi(url){
  10. //var agree = confirm("¿Realmente desea editarlo?");
  11. if (confirm("¿Realmente desea editarlo?"))
  12.     window.location.href = url;
  13. else
  14.     return false ;
  15. }
  16. </script>

y este que quiero asociar porque tengo diseño en el codigo:

Código Javascript:
Ver original
  1. <pre class="prettyprint linenums">
  2. // alert box
  3. jQuery('.alertboxbutton').click(function(){
  4.    jAlert('This is a custom alert box', 'Alert Dialog');
  5. });
  6.  
  7. // confirm box
  8. jQuery('.confirmbutton').click(function(){
  9.    jConfirm('Can you confirm this?', 'Dialog', function(r) {
  10.       jAlert('Confirmed: ' + r, 'Confirmation Results');
  11.    });
  12. });
  13.  
  14. // promptbox
  15. jQuery('.promptbutton').click(function(){
  16.    jPrompt('Type something:', '', 'Dialog', function(r) {
  17.       if( r ) alert('You entered ' + r);
  18.    });
  19. });
  20.  
  21. // alert with html
  22. jQuery('.alerthtmlbutton').click(function(){
  23.    jAlert('HTML, like &lt;strong&gt;, &lt;em&gt;, &lt;u&gt;, etc.!');
  24. });                            
  25. </pre>


Donde el html es este que hace llamado al Jquery

Código HTML:
Ver original
  1. <a href='orden.php?id_venta=".$row["id_venta"]."' class='btn confirmbutton'><span class='icon-eye-open'></span></a>

Y este llama al javascript:

Código HTML:
Ver original
  1. <a href='orden.php?id_venta=".$row["id_venta"]."' class='btn' onclick='if(confirmDel() == false){return false;}'><span class='icon-eye-open'></span></a>

No se unirlos, me gustaría me pudieran ayudar.

Slds,
__________________
Sé parte de nuestro mundo creativo.

http://bbcreativos.com

Etiquetas: asociar, html, javascript
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:09.