Mostrando entradas con la etiqueta JQuery. Mostrar todas las entradas
Mostrando entradas con la etiqueta JQuery. Mostrar todas las entradas

viernes, 15 de noviembre de 2013

Convertir un Array de Objetos Javascript a JSon


I made it that way:

if I have:

var jsonArg1 = new Object();
    jsonArg1.name = 'calc this';
    jsonArg1.value = 3.1415;
var jsonArg2 = new Object();
    jsonArg2.name = 'calc this again';
    jsonArg2.value = 2.73;

var pluginArrayArg = new Array();
    pluginArrayArg.push(jsonArg1);
    pluginArrayArg.push(jsonArg2);
to convert pluginArrayArg (which is pure javascript array) into JSON array:

var jsonArray = JSON.parse(JSON.stringify(pluginArrayArg))


Gracias al aporte de:
http://stackoverflow.com/questions/2295496/convert-array-to-json


Como se hace en AJAX:

$.ajax({

                url:"contextPath/data",

                type:"POST",

                contentType: "application/json; charset=utf-8",

                data: JSON.stringify(pluginArrayArg)  , //Stringified Json Object

                async: false,    //Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation

                cache: false,    //This will force requested pages not to be cached by the browser

                processData:false, //To avoid making query String instead of JSON

                success: function(resposeJsonObject){
alert(resposeJsonObject);
        }});

martes, 3 de abril de 2012

Mostrar mensaje antes y despues de cargar la página con JQUERY

Barra Superior Cargando Página Usando Jquery

jQuery BlockUI Plugin (v2)

Ejemplo:

inicio
script type=text/javascript
$(document).ready(function() {
$.blockUI({message: < h1 >Cargando...< /h1 > });
});

$(window).load(function () {
// run code
$.unblockUI();
});

script
fin

Flip con jQuery

Permite agragar efecto aun link Flip con jQuery

Ejemplo

jueves, 24 de marzo de 2011

JQuery Bloquear pagina mientras se carga Load...

Usando BlockUI

The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser[1]. When activated, it will prevent user activity with the page (or part of the page) until it is deactivated. BlockUI adds elements to the DOM to give it both the appearance and behavior of blocking user interaction.

Ver Pagina Oficial

Implementando nuestro propio Loading

domingo, 13 de marzo de 2011

JQuery con otras librerias(Prototype)

Este articulo muestra como podemos usar en combinacion JQuery y Prototype.

http://docs.jquery.com/Using_jQuery_with_Other_Libraries

miércoles, 6 de enero de 2010

Validar Rut Chileno

Función para Validar de Rut en JQuery

http://joaquinnunez.cl/jQueryRutPlugin/


Funciones para Validar Rut en 30 Lenguajes
http://www.dcc.uchile.cl/~mortega/microcodigos/validarrut/