Cómo saber si una variable es indefined

Cómo saber si una variable es indefined; if (typeof(nombre)==”undefined”)

Equivalente isset en asp.net

If Not Identifier Is Nothing end if

Cómo simular ajax con un iframe

Código Javascript que nos permite recuperar el contenido de un iframe, lo utilizaremos para averigual si la operación es correcta o incorrecta. pass=0; function respuesta(){ { var prevfrm = document.getElementById(iframe).contentWindow.document; var recuperar; recuperar=prevfrm.body.innerHTML; if (pass!=0) { result=recuperar.split("||"); if (result[1]) alert("La operacion es correcta"); else alert("Operacion incorrecta"); } else pass=1; } } Y ahora el código

(Read More…)

Posición de un div con jquery

var elemento = $(“.rel”); var posicion = elemento.position(); y=posicion.top;

Incluir avi en HTML

<OBJECT CLASSID="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95F" HEIGHT=150 WIDTH=150 NAME=Msshow1 ID=Msshow1> <PARAM NAME="FileName" VALUE="fireworks.AVI"> <PARAM NAME="autoStart" VALUE="true"> <PARAM NAME="showControls" VALUE="false"> <PARAM NAME="PlayCount" VALUE="20"> <embed src="fireworks.AVI" width="150" height="150" controller="false" autostart="true" loop=true> </EMBED> </OBJECT>

Añadir y eliminar estilos con jquery

$(‘#div).removeClass(‘estilo1′).addClass(‘btn_estilo2);

Array dinámico con asp.net

Dim array() As String ReDim array(0) array(0) = “elemento1″ ReDim Preserve array(UBound(array) + 1) array(UBound(array)) = “elemento2″

Incrementar una fecha en asp.net

Con este ejemplo incrementamos seis meses a la fecha introducida. Dim text1 As String Dim fecha As Date fecha=”01/01/2012″ fecha = DateAdd(“m”, 6, fecha) Response.Write(fecha)

Añadir value al select en ASP.NET

ListBox1.Items.Add(New ListItem(nom, valor)) Para resear el select ListBox1.Items.Clear()

Añadir o modificar campo autoincrement en SQL SERVER

Para crear un nuevo campo: ALTER TABLE usuarios ADD uid INT IDENTITY (100,1) Para modificar un campo ya creado: ALter table usuarios Alter column uid int identity(100, 1) not null

© chlinformatica 2011
CyberChimps