Ver Mensaje Individual
  #5 (permalink)  
Antiguo 01/02/2012, 12:21
sicosis1
 
Fecha de Ingreso: enero-2012
Mensajes: 55
Antigüedad: 13 años
Puntos: 1
Respuesta: que significa esto

me puedes explicar por que === 0 lo busca al comienzo??? y tengo otra duda ribon

ojala me puedas ayudar


tengo este codigo, si te fijas tiene autofocus y autofill en true , peor no me funciona , crees poder saber por que???
de antemano muchas gracias

$j = jQuery.noConflict();
(function($j){ // line to avoid conflict with Prototype.Event at window.onload
$j(document).ready(function() {

// agregar boton para "cerrar ventana"
$j('#cv_control_porterias-windowtitle').append(
$j('<div class="window_close"></div>').click(function (e)
{
$j(this.parentNode.parentNode).hide();
})
);

// evento que se lanza al cambiar el <select> que pagina en lugar
// de utilizar las flechas izquierda-derecha
if ($('offset-1'))
{
Event.observe('offset-1', 'change', function(e)
{
Event.element(e).form.submit();
Event.stop(e);
}, false);
}
// ACA COMIENZA EL CODIGO PARA LOS PROVEEDORES
// ESTE CODIGO SE TUVO QUE REPLICAR 5 VECES PARA LOS 5 PROVEEDORES
// EN CASO DE MODIFICACION HAY QUE MODIFICAR LAS 5 COPIAS

if ($j("#has_sap").length) {
$j("#ControlPorteriaProveedor-0-rut_proveedor")
.autocomplete(

{
source: function( request, response ) {
$j.ajax({
url: 'jsonp.php',
dataType: "jsonp",
data: {
method: "main:cv_control_porterias:getSuppliers",
autocomplete: "1",
argv_0: request.term
},
success: function( data ) {
response( $j.map( data.rows, function( item ) {
return {
label: item.name,
value: item.id,
source: item
}
}));
}

});

},
minLength: 4,
autoFill: true, autoFocus: true,



select: function(event, ui) {
$j("#ControlPorteriaProveedor-0-nombre_proveedor").val(ui.item.source.name)

},
open: function() {
$j( this ).removeClass( "ui-corner-all" ).addClass( "ui-corner-top" );
},
close: function() {
$j( this ).removeClass( "ui-corner-top" ).addClass( "ui-corner-all" );
}

});
}


});
})(jQuery); // line to avoid conflict with Prototype.Event at window.onload