Ver Mensaje Individual
  #4 (permalink)  
Antiguo 18/10/2013, 12:12
shaserUsa
 
Fecha de Ingreso: octubre-2011
Ubicación: USA
Mensajes: 166
Antigüedad: 12 años, 6 meses
Puntos: 19
Respuesta: Comunicación entre modelo y javascript

Tienes que hacerlo con el metodo ajax de jquery tambien puedes utilizar metodos axiliar de javascript hechos por ti algo asi

Código Javascript:
Ver original
  1. $.ajax({
  2.                             url:dProduct,
  3.                             type:'GET',
  4.                             beforeSend: function () {
  5.                                 $('#imgid'+productId).remove();
  6.                                 $('#loadID'+productId).html("<img id='Igif' src='<?php echo site_url('images/ui-anim_basic_16x16.gif')?>'>");
  7.                                 $("#dialog-confirm").dialog( "close" );
  8.                             },
  9.                             success: function () {
  10.                                 $("#area"+productId).remove();
  11.                                 subTotal();
  12.                                 Total(document.getElementById('txt_desc').value,document.getElementById('txt_tax').value)
  13.                             },
  14.                             error: function(){
  15.                                 $( "#dialog-confirm" ).dialog( "close" );
  16.                             }
  17.                         })//ajax

Saludos