<?xml version="1.0" encoding="iso-8859-1"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>Javascript y jQuery, foros de Cristalab</title>
        <link>http://www.cristalab.com/foros/viewforum.php?f=28</link>
        <description>Interacción, efectos, aplicaciones web, frameworks, jQuery.</description>
		<language>es-co</language>
		<generator>http://www.cristalab.com/</generator>
        <webMaster>webmaster@cristalab.com</webMaster>
        <atom:link rel="search" href="/opensearch.xml" type="application/opensearchdescription+xml" title="Cristalab" />
	    <item>
    	    <title>Necesito consumir servicios de NIT o una alternativa para consumirlo</title>
        	<link>http://foros.cristalab.com/necesito-consumir-servicios-de-nit-o-una-alternativa-para-consumirlo-t123929/</link>
			<guid>http://foros.cristalab.com/necesito-consumir-servicios-de-nit-o-una-alternativa-para-consumirlo-t123929/</guid>
	        <description><![CDATA[ Buenas tardese trabajo en una plataforma  que se llama HandelBay contamos con un módulo de registro donde primero se diligencia el NIT de una empresa a registrarse en la plataforma y luego el nombre de ella. Lo que queremos es que al momento de ingresar el NIT el nombre de la empresa se diligencie automaticamente como ... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ Buenas tardese trabajo en una plataforma  que se llama HandelBay contamos con un módulo de registro donde primero se diligencia el NIT de una empresa a registrarse en la plataforma y luego el nombre de ella. Lo que queremos es que al momento de ingresar el NIT el nombre de la empresa se diligencie automaticamente como lo hace la plataforma de mercadopago  <a href="https://www.mercadopago.com.co/registration-company" target="_blank">https://www.mercadopago.com.co/registration-company</a> el envío el link de referencia y no sabemos como hacerlo. Le agradezco mucho si me puede colaborar<p><a href="http://foros.cristalab.com/necesito-consumir-servicios-de-nit-o-una-alternativa-para-consumirlo-t123929/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Wed, 20 Nov 2019 12:11:36</pubDate>
	    </item>
	    <item>
    	    <title>Sumar y restar con decimales</title>
        	<link>http://foros.cristalab.com/sumar-y-restar-con-decimales-t123638/</link>
			<guid>http://foros.cristalab.com/sumar-y-restar-con-decimales-t123638/</guid>
	        <description><![CDATA[ Tengo el siguiente código que suma  y resta en tiempo real los valores ingresados en los campos, adicionalmente los campos son solo números, y coloca automáticamente el separador de miles.. todo funciona bien solo que no me suma decimales.. (números separados por el punto de mil) acá pongo el Script el cual no se que h... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[  Tengo el siguiente código que suma  y resta en tiempo real los valores ingresados en los campos, adicionalmente los campos son solo números, y coloca automáticamente el separador de miles.. todo funciona bien solo que no me suma decimales.. (números separados por el punto de mil) acá pongo el Script el cual no se que hacer para que funcione sin problemas (Sume y Reste usando decimales)<br /><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint lang-js">&lt;html&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;script&gt;
//---- SCRIPT SUMA Y RESTA EN CAMPOS--------
function fncSumar&#40;&#41;&#123;
caja=document.forms&#91;&quot;sumar&quot;&#93;.elements;
var numero1 = Number&#40;caja&#91;&quot;numero1&quot;&#93;.value&#41;;
var numero2 = Number&#40;caja&#91;&quot;numero2&quot;&#93;.value&#41;;
var numero3 = Number&#40;caja&#91;&quot;numero3&quot;&#93;.value&#41;;
resultado=numero1+numero2-numero3;
if&#40;!isNaN&#40;resultado&#41;&#41;&#123;
caja&#91;&quot;resultado&quot;&#93;.value=numero1+numero2-numero3;
&#125;
&#125;
//-----SCRIPT SEPARADOR DE MILES---------
function format&#40;input&#41;
&#123;
var num = input.value.replace&#40;/\./g,''&#41;;
if&#40;!isNaN&#40;num&#41;&#41;&#123;
num = num.toString&#40;&#41;.split&#40;''&#41;.reverse&#40;&#41;.join&#40;''&#41;.replace&#40;/&#40;?=\d*\.?&#41;&#40;\d&#123;3&#125;&#41;/g,'$1.'&#41;;
num = num.split&#40;''&#41;.reverse&#40;&#41;.join&#40;''&#41;.replace&#40;/^&#91;\.&#93;/,''&#41;;
input.value = num;
&#125;
//-- ALERTA SOLO NUMEROS 
else&#123; alert&#40;'Solo se permiten numeros'&#41;;
input.value = input.value.replace&#40;/&#91;^\d\.&#93;*/g,''&#41;;
&#125;
&#125;
&lt;/script&gt;
&lt;form method=&quot;post&quot; name=&quot;sumar&quot;&gt;

&nbsp; &lt;p&gt;+Primer Numero&#58;
&nbsp; &nbsp; &lt;input type=&quot;text&quot; name=&quot;numero1&quot; onKeyUp=&quot;fncSumar&#40;&#41;;format&#40;this&#41;&quot; onchange=&quot;format&#40;this&#41;&quot;/&gt;
&nbsp; &lt;/p&gt;
&nbsp; &lt;p&gt;+ Segundo Numero&#58;
&nbsp; &nbsp; &lt;input type=&quot;text&quot; name=&quot;numero2&quot; onKeyUp=&quot;fncSumar&#40;&#41;;format&#40;this&#41;&quot; onchange=&quot;format&#40;this&#41;&quot;/&gt;
&nbsp; &lt;/p&gt;
&nbsp; &lt;p&gt;- Tercer Numero&#58;
&nbsp; &nbsp; &lt;input type=&quot;text&quot; name=&quot;numero3&quot; onKeyUp=&quot;fncSumar&#40;&#41;;format&#40;this&#41;&quot; onchange=&quot;format&#40;this&#41;&quot;/&gt;
&nbsp; &lt;/p&gt;
&nbsp; &lt;p&gt;Resultado&#58;
&nbsp; &lt;input name=&quot;resultado&quot; type=&quot;text&quot; readonly/&gt;
&nbsp; &lt;/p&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre><p><a href="http://foros.cristalab.com/sumar-y-restar-con-decimales-t123638/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Mon, 04 Nov 2019 11:36:36</pubDate>
	    </item>
	    <item>
    	    <title>introducir datos a un array</title>
        	<link>http://foros.cristalab.com/introducir-datos-a-un-array-t123247/</link>
			<guid>http://foros.cristalab.com/introducir-datos-a-un-array-t123247/</guid>
	        <description><![CDATA[ esperando me puedan ayudar y es con lo siguiente lo que deseo es llenar un array de javascript con datos de una tabla de mysql. que es lo que estoy haciendo mal?<br />
GRACIAS.<br />
	<script language="javascript"><br />
		<br />
		var cve = [];<br />
		<?<br />
			require ("conecta.php");<br />
			$sql = "Select clave,... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[  esperando me puedan ayudar y es con lo siguiente lo que deseo es llenar un array de javascript con datos de una tabla de mysql. que es lo que estoy haciendo mal?<br />GRACIAS.<br />	&lt;script language=&quot;javascript&quot;&gt;<br />		<br />		var cve = [];<br />		&lt;?<br />			require (&quot;conecta.php&quot;);<br />			$sql = &quot;Select clave, area, titular from claves&quot;;<br />			$datos = mysqli_query($conectado, $sql);<br />			while($row=mysqli_fetch_array($datos, true)){<br />				echo &quot;cve.push({Clave:&quot;.$row['clave'].&quot;, Area:&quot;.$row['area'].&quot;, Titular:&quot;.$row['titlar'].&quot;})&quot;;<br />			}<br />		?&gt;<br />		for (x=0; x&lt;cve.length; x++){<br />        	document.write(cve[x] + &quot; &quot;);<br />		}<br /><br />	&lt;/script&gt;<p><a href="http://foros.cristalab.com/introducir-datos-a-un-array-t123247/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Tue, 08 Oct 2019 16:45:07</pubDate>
	    </item>
	    <item>
    	    <title>Bloquear las cookies de mi web hasta que el usuario las acepte</title>
        	<link>http://foros.cristalab.com/bloquear-las-cookies-de-mi-web-hasta-que-el-usuario-las-acepte-t123105/</link>
			<guid>http://foros.cristalab.com/bloquear-las-cookies-de-mi-web-hasta-que-el-usuario-las-acepte-t123105/</guid>
	        <description><![CDATA[ Hola  a tod@s, <br />
estoy muy bloqueado con este tema, no logro desarrollar un sistema que revise si mi web tiene cookies que las bloquee hasta que el user acepte los términos  damas. <br />
Alguien me podría orientar? Gracias... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ Hola  a tod@s, <br />estoy muy bloqueado con este tema, no logro desarrollar un sistema que revise si mi web tiene cookies que las bloquee hasta que el user acepte los términos  damas. <br />Alguien me podría orientar? Gracias<p><a href="http://foros.cristalab.com/bloquear-las-cookies-de-mi-web-hasta-que-el-usuario-las-acepte-t123105/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Mon, 30 Sep 2019 07:48:41</pubDate>
	    </item>
	    <item>
    	    <title>javascrip</title>
        	<link>http://foros.cristalab.com/javascrip-t122822/</link>
			<guid>http://foros.cristalab.com/javascrip-t122822/</guid>
	        <description><![CDATA[ hola... tengo un programa en javascripr (soy nueva en todo esto) y necesito sumar radiosbutton, son 9 en total clasificados en grupos de 3, quiero q al momento de seleccionar un de cada grupo los sume, pero no puedo... (lo mas probable es q este malo).. alguien q me ilumine?<br />
este es el programa..<br />
<br />
<html><br />
<... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[  hola... tengo un programa en javascripr (soy nueva en todo esto) y necesito sumar radiosbutton, son 9 en total clasificados en grupos de 3, quiero q al momento de seleccionar un de cada grupo los sume, pero no puedo... (lo mas probable es q este malo).. alguien q me ilumine?<br />este es el programa..<br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint">
&lt;html&gt;
&lt;head&gt;
&nbsp; &nbsp; &lt;meta charset=&quot;utf-8&quot;&gt;
&nbsp; &nbsp; &lt;style&gt;
&nbsp; &nbsp; &nbsp; &nbsp; body &#123;background-color&#58; #e1e637;&#125;
&nbsp; &nbsp; &nbsp; &nbsp; h1&nbsp; &nbsp;&#123;color&#58; #ff090e;&#125;
&nbsp; &nbsp; &lt;/style&gt;
&nbsp; &nbsp; &lt;script type=&quot;text/javascript&quot;&gt;
&nbsp; &nbsp; &nbsp; &nbsp; function total&#40;&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if &#40;document.getElementsByName&#40;'principal'&#41;.checked&#41;&#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; prin=12;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125; else if &#40;document.getElementsByName&#40;'principal'&#41;.checked&#41;&#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; prin=20;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125; else &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#40;document.getElementsByName&#40;'principal'&#41;.checked&#41;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; prin=25;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/script&gt;
&nbsp; &nbsp; &lt;script&gt;
&nbsp; &nbsp; &nbsp; &nbsp; function total2&#40;&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if &#40;document.getElementsByName&#40;'bebida'&#41;.checked&#41;&#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; prin2=7;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125; else if &#40;document.getElementById&#40;'n5'&#41;.checked&#41;&#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; prin2=4;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125; else &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#40;document.getElementById&#40;'n6'&#41;.checked&#41;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; prin2=5;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &lt;/script&gt;
&nbsp; &nbsp; &lt;script&gt;
&nbsp; &nbsp; &nbsp; &nbsp; function total3&#40;&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if &#40;document.getElementsByName&#40;'postre'&#41;.checked&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; prin3=7;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125; else if &#40;document.getElementById&#40;'n8'&#41;.checked&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; prin3=5;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125; else &#123;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#40;document.getElementById&#40;'n9'&#41;.checked&#41;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; prin3=9;
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &nbsp; &nbsp; &#125;

&nbsp; &nbsp; &lt;/script&gt;



&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt; CAFETERIA &lt;/h1&gt;

&lt;/script&gt;
&lt;p&gt; SELECCIONE EL PLATO PRINCIPAL&lt;/p&gt;
&lt;input type=&quot;radio&quot; id=&quot;n1&quot; name=&quot;principal&quot; value=&quot;12&quot; &gt; Caldo de pollo Q12.00 &lt;br&gt;&lt;br&gt;
&lt;input type=&quot;radio&quot; id=&quot;n2&quot; name=&quot;principal&quot; value=&quot;20&quot; &gt; pescado frito Q20.00&lt;br&gt;&lt;br&gt;
&lt;input type=&quot;radio&quot; id=&quot;n3&quot; name=&quot;principal&quot; value=&quot;25&quot; &gt; revolcado Q25.00&lt;br&gt;&lt;br&gt;


&lt;p&gt; SELECCIONE SU BEBIDA&lt;/p&gt;
&lt;input type=&quot;radio&quot; id=&quot;n4&quot; name=&quot;bebida&quot; value=&quot;7&quot;&nbsp; &gt;&nbsp; CocaCola Q7.OO&lt;br&gt;&lt;br&gt;
&lt;input type=&quot;radio&quot; id=&quot;n5&quot; name=&quot;bebida&quot; value=&quot;4&quot; &gt; Jamaica Q4.00&lt;br&gt;&lt;br&gt;
&lt;input type=&quot;radio&quot; id=&quot;n6&quot; name=&quot;bebida&quot; value=&quot;5&quot; &gt; Sprite Q5.00&lt;br&gt;&lt;br&gt;
&lt;p&gt; SELECCIONE SU POSTRE&lt;/p&gt;
&lt;input type=&quot;radio&quot; id=&quot;n7&quot; name=&quot;postre&quot; value=&quot;7&quot;&nbsp; &gt; Pastel de fresa Q7.oo&lt;br&gt;&lt;br&gt;
&lt;input type=&quot;radio&quot; id=&quot;n8&quot; name=&quot;postre&quot; value=&quot;5&quot; &gt; Helado de Chocolate Q5&lt;br&gt;&lt;br&gt;
&lt;input type=&quot;radio&quot; id=&quot;n9&quot; name=&quot;postre&quot; value=&quot;9&quot; &gt; Coctel de frutas Q9.00&lt;br&gt;&lt;br&gt;
&lt;input type=&quot;button&quot;&nbsp; name=&quot;name&quot; value=&quot;suma&quot;&nbsp; onclick=&quot;Pluss&#40;&#41;;&quot;&gt;

&nbsp; &lt;/form&gt;
&nbsp; &nbsp; &lt;script&gt;
&nbsp; &nbsp; function Pluss&#40;&#41;
&nbsp; &nbsp; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; var prin;
&nbsp; &nbsp; &nbsp; &nbsp; var prin2;
&nbsp; &nbsp; &nbsp; &nbsp; var prin3;
&nbsp; &nbsp; &nbsp; &nbsp; var result;
&nbsp; &nbsp; &nbsp; &nbsp; result=prin+prin2+prin3;
&nbsp; &nbsp; &nbsp; &nbsp; alert&#40;&quot;la suma es&#58;&quot; +result&#41;;


&nbsp; &nbsp; &#125;
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre><p><a href="http://foros.cristalab.com/javascrip-t122822/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Wed, 11 Sep 2019 09:20:41</pubDate>
	    </item>
	    <item>
    	    <title>Formulario con html y base de datos google SpreadSheet</title>
        	<link>http://foros.cristalab.com/formulario-con-html-y-base-de-datos-google-spreadsheet-t122607/</link>
			<guid>http://foros.cristalab.com/formulario-con-html-y-base-de-datos-google-spreadsheet-t122607/</guid>
	        <description><![CDATA[ Hola, soy nuevo acá comenzando a entender JS y para allá voy. Programo en vb<br />
<br />
Estuve buscando algunos ejemplos de formularios o cuadros de diálogos para "SpreadSheets" en internet y me encuentro con un tipo que engaña a la gente con un código que esta malo y a pesar de que mucha gente quiere saber como es y... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ Hola, soy nuevo acá comenzando a entender JS y para allá voy. Programo en vb<br /><br />Estuve buscando algunos ejemplos de formularios o cuadros de diálogos para &quot;SpreadSheets&quot; en internet y me encuentro con un tipo que engaña a la gente con un código que esta malo y a pesar de que mucha gente quiere saber como es y si tiene el ejemplo en linea el solo se ríe de ellos haciéndoles creer que lo tiene y los llena de bendiciones.<br /><br />el vídeo:<br /><br />https://www.youtube.com/watch?v=AlU9iceb65g&amp;t=8s<br /><br />El vídeo que sale ahí NUNCA lo comparte y hace creer a la gente que lo tiene pero al parecer es un chanta. Pues bien, me di el trabajo de ver la pantalla y escribirlo por completo dicho código. Era obvio, ESTÁ MALO y este tipo al momento de mostrar la &quot;secuencia de comando&quot; hace Alt+Tab para ir al código de la supuesta hoja de cálculos va a otro código.<br /><br />https://docs.google.com/spreadsheets/d/1ajEBFri7aGF0U2mPIPoZen7r-SAGgEzodrknB9kerJA/edit#gid=0<br /><br /><br />ahí está lo hecho (código escrito), mi duda es si es que alguien me puede ayudar a depurarlo y hacerlo funcionar.<br /><br />Muy agradecido<br /><br />Gastro<br />Market !!<p><a href="http://foros.cristalab.com/formulario-con-html-y-base-de-datos-google-spreadsheet-t122607/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Sun, 25 Aug 2019 18:00:22</pubDate>
	    </item>
	    <item>
    	    <title>Cambio de clase CSS con JQuery</title>
        	<link>http://foros.cristalab.com/cambio-de-clase-css-con-jquery-t122604/</link>
			<guid>http://foros.cristalab.com/cambio-de-clase-css-con-jquery-t122604/</guid>
	        <description><![CDATA[ Buenas tardes,<br />
<br />
Estoy tratando de realizar un cambio de clase, cuando un <li> tiene la clase "active", que muestre la clase ""text-color-dark", y en caso contrario ""text-color-light", pero el código que he programado no hay manera de que funcione.<br />
<br />
He hecho variaciones... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[  Buenas tardes,<br /><br />Estoy tratando de realizar un cambio de clase, cuando un &lt;li&gt; tiene la clase &quot;active&quot;, que muestre la clase &quot;&quot;text-color-dark&quot;, y en caso contrario &quot;&quot;text-color-light&quot;, pero el código que he programado no hay manera de que funcione.<br /><br />He hecho variaciones pero no logro que realice ningún cambio. ¿Alguna idea?<br /><br />Muchas gracias de antemano,<br /><br /><strong>HTML</strong><br /><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint">&lt;li id=&quot;MenuPrinc&quot;&gt;&lt;a data-hash href=&quot;#1&quot; id=&quot;APrinc&quot; class=&quot;bg&quot;&gt;&lt;/a&gt;&lt;/li&gt;</pre><br /><br /><strong>SCRIPT JQUERY</strong><br /><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint">&lt;script&gt;

&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40; &quot;MenuPrinc&quot; &#41;.click&#40;function&#40;&#41; &#123;
 
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if &#40; $&#40; this &#41;.hasClass&#40; &quot;active&quot; &#41; &#41; &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40; &quot;APrinc&quot; &#41;.removeClass&#40; &quot;text-color-light&quot; &#41;.addClass&#40; &quot;text-color-dark&quot; &#41;;

&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;//$&#40; this &#41;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;//.animate&#40;&#123; left&#58; -10 &#125;&#41;;

&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;

&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&lt;/script&gt;</pre><p><a href="http://foros.cristalab.com/cambio-de-clase-css-con-jquery-t122604/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Sun, 25 Aug 2019 11:40:27</pubDate>
	    </item>
	    <item>
    	    <title>problema con fecha en javascript</title>
        	<link>http://foros.cristalab.com/problema-con-fecha-en-javascript-t122125/</link>
			<guid>http://foros.cristalab.com/problema-con-fecha-en-javascript-t122125/</guid>
	        <description><![CDATA[ Tengo problemas para al enviar una fecha desde javascript hacia un <input type=text> la recibo dentro del textbox en formato "Wed Jul 31 2019 23:50:47 GMT-0400 (hora estándar de del país)" y la estoy enviando en 'Y-m-d' . <br />
                                <br />
                               $('#da... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[  Tengo problemas para al enviar una fecha desde javascript hacia un &lt;input type=text&gt; la recibo dentro del textbox en formato &quot;Wed Jul 31 2019 23:50:47 GMT-0400 (hora estándar de del país)&quot; y la estoy enviando en 'Y-m-d' . <br />                                <br />                             <p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint lang-js">&nbsp; $&#40;'#datetimepicker'&#41;.datetimepicker&#40;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;disabledDates&#58; &#91;'2019-07-23'&#93;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;formatDate&#58;'Y-m-d',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;format&#58; 'Y-m-d H&#58;i',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;formatTime&#58; 'H&#58;i',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;step&#58; &#40;60&#41;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;allowBlank&#58; false,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;onSelectDate&#58; function&#40;dateText, inst&#41; &#123;$&#40;&quot;input&#91;name='datos'&#93;&quot;&#41;.val&#40;dateText&#41;;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;&#41;;</pre><br /><br />bueno soy nuevo en javascript, creo que debo poner el fortmatDate dentro de la función pero no se como hacerlo, ayuda!!<p><a href="http://foros.cristalab.com/problema-con-fecha-en-javascript-t122125/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Thu, 18 Jul 2019 22:49:23</pubDate>
	    </item>
	    <item>
    	    <title>tablero informativo</title>
        	<link>http://foros.cristalab.com/tablero-informativo-t122109/</link>
			<guid>http://foros.cristalab.com/tablero-informativo-t122109/</guid>
	        <description><![CDATA[ saludos señores experto en la materia...<br />
<br />
Algunos de ustedes me puede asesorar que programa puedo usar para hacer un tablero informativo, donde se muestre los datos y que el tiempo se actualice constantemente.. no improta que sea web por lo importante es que se muestre en una pantalla<br />
<br />
de ante mano muchas gracias... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ saludos señores experto en la materia...<br /><br />Algunos de ustedes me puede asesorar que programa puedo usar para hacer un tablero informativo, donde se muestre los datos y que el tiempo se actualice constantemente.. no improta que sea web por lo importante es que se muestre en una pantalla<br /><br />de ante mano muchas gracias<p><a href="http://foros.cristalab.com/tablero-informativo-t122109/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Wed, 17 Jul 2019 13:51:09</pubDate>
	    </item>
	    <item>
    	    <title>Problema al usar una url conectando a un websoket</title>
        	<link>http://foros.cristalab.com/problema-al-usar-una-url-conectando-a-un-websoket-t121917/</link>
			<guid>http://foros.cristalab.com/problema-al-usar-una-url-conectando-a-un-websoket-t121917/</guid>
	        <description><![CDATA[ Resulta que al usar la ip y puerto del servidor donde se encuentra en serversoket funciona perfecto... pero al cambiar por la url o dominio del servidor ya no funciona, tal vez tenga algo que ver que uso cloudflare para apuntar el dominio a mi servidor dedicado ?... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ Resulta que al usar la ip y puerto del servidor donde se encuentra en serversoket funciona perfecto... pero al cambiar por la url o dominio del servidor ya no funciona, tal vez tenga algo que ver que uso cloudflare para apuntar el dominio a mi servidor dedicado ?<p><a href="http://foros.cristalab.com/problema-al-usar-una-url-conectando-a-un-websoket-t121917/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Tue, 02 Jul 2019 11:29:11</pubDate>
	    </item>
	    <item>
    	    <title>jQuery Datepicker Adaptativo</title>
        	<link>http://foros.cristalab.com/jquery-datepicker-adaptativo-t121575/</link>
			<guid>http://foros.cristalab.com/jquery-datepicker-adaptativo-t121575/</guid>
	        <description><![CDATA[ Hola...<br />
<br />
Estoy rediseñando una web para alquilar coches por internet y mis clientes me han pedido desarrollar un selector de fechas de los que muestra dos calendarios que permite seleccionar un rango de fechas para la recogida y entrega del coche de alquiler, pero que se despliegan a la vez dos calendarios y puedes e... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ Hola...<br /><br />Estoy rediseñando una web para alquilar coches por internet y mis clientes me han pedido desarrollar un selector de fechas de los que muestra dos calendarios que permite seleccionar un rango de fechas para la recogida y entrega del coche de alquiler, pero que se despliegan a la vez dos calendarios y puedes elegir a la vez las dos fechas sin cambiar de selector, seleccionando todo el rango (en vez de desplegar un calendario distinto para cada fecha).<br /><br />He intentado implementar un par de scripts que he encontrado, pero o me resultan muy complicados de configurar... o no son adaptativos para dispositivos móviles.<br /><br />¿Alguien conoce alguno que funcione bien, sea fácil de configurar y sea adaptativo? (Por pedir)... la verdad es que soy diseñador gráfico... y aunque me defiendo programando, en el fondo no es lo mío... La web para la que trabajo es la que hablan en el enlace de mi firma, pero no quiero poner enlaces directos para que no lo rastreen y den con este hilo.<br /><br />Gracias.<p><a href="http://foros.cristalab.com/jquery-datepicker-adaptativo-t121575/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Fri, 07 Jun 2019 02:25:29</pubDate>
	    </item>
	    <item>
    	    <title>Pasar de un select a otro y sumar campo</title>
        	<link>http://foros.cristalab.com/pasar-de-un-select-a-otro-y-sumar-campo-t121520/</link>
			<guid>http://foros.cristalab.com/pasar-de-un-select-a-otro-y-sumar-campo-t121520/</guid>
	        <description><![CDATA[ Amigos me podrían ayudar con este código funciona perfectamente, lo que busco es en el caso que el select de destino llegaran los datos de esta manera<br />
<br />
ALBERTO Y UBALDO / Lunes / Grabado / 04:00:00 / 01:36:45<br />
DEMO / INSTITUCIONAL / 00:02:17<br />
<br />
y así sucesivamente como haría para sumar esas hora. esos datos los obten... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[  Amigos me podrían ayudar con este código funciona perfectamente, lo que busco es en el caso que el select de destino llegaran los datos de esta manera<br /><br />ALBERTO Y UBALDO / Lunes / Grabado / 04:00:00 / 01:36:45<br />DEMO / INSTITUCIONAL / 00:02:17<br /><br />y así sucesivamente como haría para sumar esas hora. esos datos los obtengo de unas BD/Tablas que recorre un while &lt;?php echo $row[2].''.$row[3].''.$row[4].''.$row[5].''.$row[6].'';?&gt;<br /><br />el $row[6] es el campo que se obtiene la duración o tiempo, entonces ayúdenme a sumar el total de ese campo, muchas gracias a la colaboración.<br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint">
$&#40;document&#41;.ready&#40;function&#40;&#41; &#123;
&nbsp; &nbsp; $&#40;'.pasar'&#41;.click&#40;function&#40;&#41; &#123; 
&nbsp; &nbsp; &nbsp; &nbsp; var opcion = $&#40;'#origen option&#58;selected'&#41;.clone&#40;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; var valor = $&#40;opcion&#41;.val&#40;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; // Verificar si ya se pasó esta opción
&nbsp; &nbsp; &nbsp; &nbsp; if &#40;$&#40;&quot;#destino option&#91;value=&quot; + valor + &quot;&#93;&quot;&#41;.length == 0&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $&#40;opcion&#41;.appendTo&#40;'#destino'&#41;; 
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &#125;&#41;;
&nbsp; &nbsp; $&#40;'.pasartodos'&#41;.click&#40;function&#40;&#41; &#123; 
&nbsp; &nbsp; &nbsp; &nbsp; $&#40;'#origen option'&#41;.each&#40;function&#40;&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var opcion = $&#40;this&#41;.clone&#40;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var valor = $&#40;opcion&#41;.val&#40;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Verificar si ya se pasó esta opción
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if &#40;$&#40;&quot;#destino option&#91;value=&quot; + valor + &quot;&#93;&quot;&#41;.length == 0&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $&#40;opcion&#41;.appendTo&#40;'#destino'&#41;; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &nbsp; &nbsp; &#125;&#41;; 
&nbsp; &nbsp; &#125;&#41;;&nbsp; 
&nbsp; &nbsp; $&#40;'.quitar'&#41;.click&#40;function&#40;&#41; &#123; 
&nbsp; &nbsp; &nbsp; &nbsp; $&#40;'#destino option&#58;selected'&#41;.remove&#40;&#41;; 
&nbsp; &nbsp; &#125;&#41;;
&nbsp; &nbsp; $&#40;'.quitartodos'&#41;.click&#40;function&#40;&#41; &#123; 
&nbsp; &nbsp; &nbsp; &nbsp; $&#40;'#destino option'&#41;.each&#40;function&#40;&#41; &#123; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $&#40;this&#41;.remove&#40;&#41;; 
&nbsp; &nbsp; &nbsp; &nbsp; &#125;&#41;; 
&nbsp; &nbsp; &#125;&#41;;
&#125;&#41;;


$&#40;document&#41;.ready&#40;function&#40;&#41; &#123;
&nbsp; &nbsp; $&#40;'.pasar'&#41;.click&#40;function&#40;&#41; &#123; 
&nbsp; &nbsp; &nbsp; &nbsp; var opcion = $&#40;'#origen option&#58;selected'&#41;.clone&#40;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; var valor = $&#40;opcion&#41;.val&#40;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; // Verificar si ya se pasó esta opción
&nbsp; &nbsp; &nbsp; &nbsp; if &#40;$&#40;&quot;#destino option&#91;value=&quot; + valor + &quot;&#93;&quot;&#41;.length == 0&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $&#40;opcion&#41;.appendTo&#40;'#destino'&#41;; 
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &#125;&#41;;
&nbsp; &nbsp; $&#40;'.pasartodos'&#41;.click&#40;function&#40;&#41; &#123; 
&nbsp; &nbsp; &nbsp; &nbsp; $&#40;'#origen option'&#41;.each&#40;function&#40;&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var opcion = $&#40;this&#41;.clone&#40;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var valor = $&#40;opcion&#41;.val&#40;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Verificar si ya se pasó esta opción
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if &#40;$&#40;&quot;#destino option&#91;value=&quot; + valor + &quot;&#93;&quot;&#41;.length == 0&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $&#40;opcion&#41;.appendTo&#40;'#destino'&#41;; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &nbsp; &nbsp; &#125;&#41;; 
&nbsp; &nbsp; &#125;&#41;;&nbsp; 
&nbsp; &nbsp; $&#40;'.quitar'&#41;.click&#40;function&#40;&#41; &#123; 
&nbsp; &nbsp; &nbsp; &nbsp; $&#40;'#destino option&#58;selected'&#41;.remove&#40;&#41;; 
&nbsp; &nbsp; &#125;&#41;;
&nbsp; &nbsp; $&#40;'.quitartodos'&#41;.click&#40;function&#40;&#41; &#123; 
&nbsp; &nbsp; &nbsp; &nbsp; $&#40;'#destino option'&#41;.each&#40;function&#40;&#41; &#123; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $&#40;this&#41;.remove&#40;&#41;; 
&nbsp; &nbsp; &nbsp; &nbsp; &#125;&#41;; 
&nbsp; &nbsp; &#125;&#41;;
&#125;&#41;;</pre><p><a href="http://foros.cristalab.com/pasar-de-un-select-a-otro-y-sumar-campo-t121520/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Sat, 01 Jun 2019 18:25:54</pubDate>
	    </item>
	    <item>
    	    <title>Orden en Datatable jquery.dataTables</title>
        	<link>http://foros.cristalab.com/orden-en-datatable-jquery.datatables-t121383/</link>
			<guid>http://foros.cristalab.com/orden-en-datatable-jquery.datatables-t121383/</guid>
	        <description><![CDATA[ Estoy usando un data table de esos que están regados pro la red, y que muchos hemos usado.. pero no he podido poner que al cargar (automáticamente) aparezca el orden DESC he visto en manuales, tutoriales y guías y nada me aclara..<br />
<br />
https://datatables.net/examples/basic_init/table_sorting.html<br />
<br />
donde se incluye el c... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[  Estoy usando un data table de esos que están regados pro la red, y que muchos hemos usado.. pero no he podido poner que al cargar (automáticamente) aparezca el orden DESC he visto en manuales, tutoriales y guías y nada me aclara..<br /><br /><a class="arti_link" href="https://datatables.net/examples/basic_init/table_sorting.html">https://datatables.net/examples/basic_init/table_sorting.html</a><br /><br />donde se incluye el cambio de ese código para realizarlo.. (veo que es en donde esta el código que lo hace posible) <br /><br />donde pongo esta parte que muestran para realizarlo...<br /><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint lang-js">$&#40;document&#41;.ready&#40;function&#40;&#41; &#123;
&nbsp; &nbsp; $&#40;'#example'&#41;.DataTable&#40; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &quot;order&quot;&#58; &#91;&#91; 3, &quot;desc&quot; &#93;&#93;
&nbsp; &nbsp; &#125; &#41;;
&#125; &#41;;</pre><br /><br />aca en este archivo?.. y si es aca en que parte... (que tengo ene l proyecto en una carpeta js2)<br />aca pongo ese archivo jquery.dataTables<br /><br /><a class="arti_link" href="https://drive.google.com/file/d/1IMYLFByyFpiroyF9q6q1hRyJcP97iMRi/view?usp=sharing">https://drive.google.com/file/d/1IMYLFByyFpiroyF9q6q1hRyJcP97iMRi/view?usp=sharing</a><br /><br />o es en el archivo del listado... <br /><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint lang-html">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&nbsp; &nbsp;&lt;title&gt;Normatividad&lt;/title&gt;
&lt;head&gt;
&nbsp; &nbsp; &lt;style type=&quot;text/css&quot;&gt;
a&#58;link &#123;
&nbsp; &nbsp;text-decoration&#58; #000000;
&#125;
a&#58;visited &#123;
&nbsp; &nbsp;text-decoration&#58; #000000;
&#125;
a&#58;hover &#123;
&nbsp; &nbsp;text-decoration&#58; #000000;
&#125;
a&#58;active &#123;
&nbsp; &nbsp;text-decoration&#58; #000000;
&#125;
&lt;/style&gt;
&nbsp; &nbsp;&nbsp; &nbsp;&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;css2/jquery.dataTables.css&quot;&gt;
&nbsp; &nbsp;&nbsp; &nbsp;&lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot; src=&quot;js2/jquery.js&quot;&gt;&lt;/script&gt;
&nbsp; &nbsp;&nbsp; &nbsp;&lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot; src=&quot;js2/jquery.dataTables.js&quot;&gt;&lt;/script&gt;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot; &gt;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40;document&#41;.ready&#40;function&#40;&#41; &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;var dataTable = $&#40;'#employee-grid'&#41;.DataTable&#40; &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&quot;processing&quot;&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&quot;serverSide&quot;&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&quot;ajax&quot;&#58;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;url &#58;&quot;adquisiciones-grid-data.php&quot;, // json datasource
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;type&#58; &quot;post&quot;,&nbsp; // method&nbsp; , by default get
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;error&#58; function&#40;&#41;&#123;&nbsp; // error handling
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40;&quot;.employee-grid-error&quot;&#41;.html&#40;&quot;&quot;&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40;&quot;#employee-grid&quot;&#41;.append&#40;'&lt;tbody class=&quot;employee-grid-error&quot;&gt;&lt;tr&gt;&lt;th colspan=&quot;3&quot;&gt;No hay Datos&lt;/th&gt;&lt;/tr&gt;&lt;/tbody&gt;'&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40;&quot;#employee-grid_processing&quot;&#41;.css&#40;&quot;display&quot;,&quot;none&quot;&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125; &#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125; &#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&lt;/script&gt;
&nbsp; &nbsp;&nbsp; &nbsp;&lt;style&gt;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;div.container &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; margin&#58; 0 auto;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; max-width&#58;760px;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;div.header &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; margin&#58; 100px auto;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; line-height&#58;30px;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; max-width&#58;760px;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;body &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; background&#58; #ffffff;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; color&#58; #333;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; font&#58; 90%/1.45em &quot;Helvetica Neue&quot;,HelveticaNeue,Verdana,Arial,Helvetica,sans-serif;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&lt;/style&gt;
&nbsp; &nbsp;&lt;/head&gt;
&nbsp; &nbsp;&lt;body&gt;
&nbsp; &nbsp;&lt;div class=&quot;container&quot;&gt;
&nbsp; &nbsp;&nbsp; &lt;table id=&quot;employee-grid&quot;&nbsp; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; class=&quot;display&quot; width=&quot;100%&quot;&gt;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;thead&gt;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;tr&gt;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;th width=&quot;50%&quot;&gt;&amp;nbsp;&lt;/th&gt;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;th width=&quot;17%&quot; bgcolor=&quot;#FFFFFF&quot;&gt;&amp;nbsp;&lt;/th&gt;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;th width=&quot;8%&quot; bgcolor=&quot;#FFFFFF&quot;&gt;&amp;nbsp;&lt;/th&gt;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &lt;/tr&gt;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;/thead&gt;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;/table&gt;
&nbsp; &nbsp;&nbsp; &lt;br&gt;
&nbsp; &nbsp;&lt;/div&gt;
&nbsp; &nbsp;&lt;/body&gt;
&lt;/html&gt;</pre><br /><br />o en este archivo que carga los datos...<br /><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint lang-php">&lt;?php
/* Database connection start */
include&#40;&quot;access.php&quot;&#41;;
$conn = mysqli_connect&#40;$servername, $username, $password, $dbname&#41; or die&#40;&quot;Connection failed&#58; &quot; . mysqli_connect_error&#40;&#41;&#41;;
/* Database connection end */
// storing&nbsp; request &#40;ie, get/post&#41; global array to a variable&nbsp; 
$requestData= $_REQUEST;
$columns = array&#40; 
// datatable column index&nbsp; =&gt; database column name
&nbsp; &nbsp;0=&gt;'id', 
&nbsp; &nbsp;1=&gt;'fecha',
&nbsp; &nbsp;2=&gt;'tipo',
&nbsp; &nbsp;3=&gt;'ciudad',
&nbsp; &nbsp;4=&gt;'descripcion',
&nbsp; &nbsp;5=&gt;'archivo',
&#41;; 
?&gt;
&lt;?php
$ciud = &quot;Ciudad&quot;;
$tip = &quot;escaner&quot;;
?&gt;
&lt;?php
$sql = &quot;SELECT id, fecha, tipo, ciudad, descripcion, archivo FROM sales WHERE tipo = '&quot;.$tip.&quot;' ORDER BY fecha DESC, id DESC&quot;;
//$sql.=&quot; ORDER BY fecha DESC, id DESC &quot;;
$query=mysqli_query&#40;$conn, $sql&#41; or die&#40;&quot;&quot;&#41;;
$totalData = mysqli_num_rows&#40;$query&#41;;
$totalFiltered = $totalData;&nbsp; 
//------------------------------------------
if&#40; !empty&#40;$requestData&#91;'search'&#93;&#91;'value'&#93;&#41; &#41; &#123;
&nbsp; &nbsp;$sql = &quot;SELECT id, fecha, tipo, ciudad, descripcion, archivo FROM sales&quot;;
&nbsp; &nbsp; $sql.=&quot; WHERE id LIKE '&quot;.$requestData&#91;'search'&#93;&#91;'value'&#93;.&quot;%' &quot;;&nbsp; &nbsp; // $requestData&#91;'search'&#93;&#91;'value'&#93; contains search parameter
&nbsp; &nbsp;$sql.=&quot; OR descripcion LIKE '%&quot;.$requestData&#91;'search'&#93;&#91;'value'&#93;.&quot;%' &quot;;
&nbsp; &nbsp;$sql.=&quot; OR fecha LIKE '%&quot;.$requestData&#91;'search'&#93;&#91;'value'&#93;.&quot;%' &quot;;
&nbsp; &nbsp;//$sql.=&quot; OR fecha LIKE '&quot;.$requestData&#91;'search'&#93;&#91;'value'&#93;.&quot;%' &quot;;
&nbsp; &nbsp;$sql.=&quot; OR archivo LIKE '&quot;.$requestData&#91;'search'&#93;&#91;'value'&#93;.&quot;%' &quot;;
&nbsp; &nbsp;$query=mysqli_query&#40;$conn, $sql&#41; or die&#40;&quot;&quot;&#41;;
&nbsp; &nbsp;$totalFiltered = mysqli_num_rows&#40;$query&#41;;&nbsp; 
&nbsp; &nbsp;$sql.=&quot; ORDER BY &quot;. $columns&#91;$requestData&#91;'order'&#93;&#91;0&#93;&#91;'column'&#93;&#93;.&quot;&nbsp; &nbsp;&quot;.$requestData&#91;'order'&#93;&#91;0&#93;&#91;'dir'&#93;.&quot;&nbsp; &nbsp;LIMIT &quot;.$requestData&#91;'start'&#93;.&quot; ,&quot;.$requestData&#91;'length'&#93;.&quot;&nbsp; &nbsp;&quot;; // $requestData&#91;'order'&#93;&#91;0&#93;&#91;'column'&#93; contains colmun index, $requestData&#91;'order'&#93;&#91;0&#93;&#91;'dir'&#93; contains order such as asc/desc , $requestData&#91;'start'&#93; contains start row number ,$requestData&#91;'length'&#93; contains limit length.
&nbsp; &nbsp;$query=mysqli_query&#40;$conn, $sql&#41; or die&#40;&quot;&quot;&#41;; // again run query with limit
//--------------------------------------------&nbsp; &nbsp;&nbsp; &nbsp;
&#125; else &#123;&nbsp; &nbsp;
&nbsp; &nbsp;$sql = &quot;SELECT id, fecha, tipo, ciudad, descripcion, archivo FROM sales WHERE tipo = '&quot;.$tip.&quot;'&quot;;
&nbsp; &nbsp;$sql.=&quot; ORDER BY &quot;. $columns&#91;$requestData&#91;'order'&#93;&#91;0&#93;&#91;'column'&#93;&#93;.&quot;&nbsp; &nbsp;&quot;.$requestData&#91;'order'&#93;&#91;0&#93;&#91;'dir'&#93;.&quot;&nbsp; &nbsp;LIMIT &quot;.$requestData&#91;'start'&#93;.&quot; ,&quot;.&nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp;$requestData&#91;'length'&#93;.&quot;&nbsp; &nbsp;&quot;;
&nbsp; &nbsp;$query=mysqli_query&#40;$conn, $sql&#41; or die&#40;&quot;&quot;&#41;;
//&lt;A HREF=&quot;http&#58;//www.example.com/myfile.pdf#page=4&quot;&gt;&nbsp; &nbsp;
&#125;
$data = array&#40;&#41;;
while&#40; $row=mysqli_fetch_array&#40;$query&#41; &#41; &#123;&nbsp; // preparing an array
&nbsp; &nbsp;$nestedData=array&#40;&#41;; 
&nbsp; &nbsp;//&lt;td&gt;&lt;center&gt;&lt;a target=\&quot;_blank\&quot; href=&quot;documentos/'.$row&#91;'archivo'&#93;.'&quot;&gt;'.$row&#91;'fecha'&#93;.'&lt;/a&gt;&lt;/center&gt;&lt;/td&gt;
&nbsp; &nbsp;//&lt;td&gt;&lt;a target=\&quot;_blank\&quot; href=&quot;documentos/'.$row&#91;'archivo'&#93;.'&quot;&gt;'.$row&#91;'descripcion'&#93;.'&lt;/a&gt;&lt;/td&gt;
&nbsp; &nbsp;//&lt;td&gt;&lt;center&gt;&lt;a target=\&quot;_blank\&quot; href=&quot;documentos/'.$row&#91;'archivo'&#93;.'&quot;&gt;&lt;img src=&quot;pdf.png&quot; width=&quot;30&quot; height=&quot;35&quot;&gt;&lt;/a&gt;&lt;/center&gt;&lt;/td&gt;
&nbsp; &nbsp;
&nbsp; &nbsp;
&nbsp; &nbsp;
&nbsp; &nbsp;
&nbsp; &nbsp;//$nestedData&#91;&#93; =&nbsp; '&lt;a href=/documentos/files/'.$row&#91;&quot;archivo&quot;&#93;.'.pdf#page='.$row&#91;&quot;pagina&quot;&#93;.' target=&quot;_blank&quot;&gt;'.$row&#91;&quot;numero&quot;&#93;.'&lt;/a&gt;';
&nbsp; &nbsp;//$nestedData&#91;&#93; =&nbsp; '&lt;a target=\&quot;_blank\&quot; href=&quot;documentos/'.$row&#91;'archivo'&#93;.'&quot;&gt;'.$row&#91;'id'&#93;.'&lt;/a&gt;';
&nbsp; &nbsp;$nestedData&#91;&#93; =&nbsp; '&lt;a target=\&quot;_blank\&quot; href=&quot;documentos/'.$row&#91;'archivo'&#93;.'&quot;&gt;'.$row&#91;'descripcion'&#93;.'&lt;/a&gt;';
&nbsp; &nbsp;$nestedData&#91;&#93; =&nbsp; '&lt;a target=\&quot;_blank\&quot; href=&quot;documentos/'.$row&#91;'archivo'&#93;.'&quot;&gt;'.$row&#91;'fecha'&#93;.'&lt;/a&gt;';
&nbsp; &nbsp;$nestedData&#91;&#93; =&nbsp; '&lt;a target=\&quot;_blank\&quot; href=&quot;documentos/'.$row&#91;'archivo'&#93;.'&quot;&gt;&lt;img src=&quot;pdf.png&quot; width=&quot;30&quot; height=&quot;35&quot;&gt;&lt;/a&gt;';
&nbsp; &nbsp;//$nestedData&#91;&#93; =&nbsp; '&lt;a href=/normatividad/files/'.$row&#91;&quot;archivo&quot;&#93;.'.pdf#page='.$row&#91;&quot;pagina&quot;&#93;.' target=&quot;_blank&quot;&gt;'.$row&#91;&quot;ano&quot;&#93;.'&lt;/a&gt;';
&nbsp; &nbsp;//$nestedData&#91;&#93; = '&lt;a href=/normatividad/files/'.$row&#91;&quot;archivo&quot;&#93;.'.pdf#page='.$row&#91;&quot;pagina&quot;&#93;.' target=&quot;_blank&quot;&gt;'.$row&#91;&quot;descripcion&quot;&#93;.'&lt;/a&gt;';
&nbsp; &nbsp;//$nestedData&#91;&#93; = '&lt;a href=/normatividad/files/'.$row&#91;&quot;archivo&quot;&#93;.'.pdf#page='.$row&#91;&quot;pagina&quot;&#93;.' target=&quot;_blank&quot;&gt;'.$row&#91;&quot;fecha&quot;&#93;.'&lt;/a&gt;';
&nbsp; &nbsp;//$nestedData&#91;&#93; = '&lt;a href=/normatividad/files/'.$row&#91;&quot;archivo&quot;&#93;.'.pdf#page='.$row&#91;&quot;pagina&quot;&#93;.' target=&quot;_blank&quot;&gt;'.$row&#91;&quot;estado&quot;&#93;.'&lt;/a&gt;';
&nbsp; &nbsp;
&nbsp; &nbsp;$data&#91;&#93; = $nestedData;
&#125;
$json_data = array&#40;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&quot;draw&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; intval&#40; $requestData&#91;'draw'&#93; &#41;,&nbsp; &nbsp;// for every request/draw by clientside , they send a number as a parameter, when they recieve a response/data they first check the draw number, so we are sending same number in draw. 
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&quot;recordsTotal&quot;&nbsp; &nbsp; =&gt; intval&#40; $totalData &#41;,&nbsp; // total number of records
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&quot;recordsFiltered&quot; =&gt; intval&#40; $totalFiltered &#41;, // total number of records after searching, if there is no searching then totalFiltered = totalData
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&quot;data&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; $data&nbsp; &nbsp;// total data array
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#41;;
echo json_encode&#40;$json_data&#41;;&nbsp; // send data as json format
?&gt;</pre><br /><br /><br />de verdad ayúdenme con esto, estaré eternamente agradecido!!!<p><a href="http://foros.cristalab.com/orden-en-datatable-jquery.datatables-t121383/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Tue, 21 May 2019 08:22:41</pubDate>
	    </item>
	    <item>
    	    <title>error llamada onchange() a script</title>
        	<link>http://foros.cristalab.com/error-llamada-onchange-a-script-t120726/</link>
			<guid>http://foros.cristalab.com/error-llamada-onchange-a-script-t120726/</guid>
	        <description><![CDATA[ buenos días, alguien me puede echar una mano?? Tengo un problema "básico" del que no puedo salir. Tengo un listado de registros con un pequeño formulario y lo que hago es que cuando onchange() ejecute una función javascript, en mi pc funciona bien, pero en el servidor me da este error: Uncaught ReferenceError... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ buenos días, alguien me puede echar una mano?? Tengo un problema &quot;básico&quot; del que no puedo salir. Tengo un listado de registros con un pequeño formulario y lo que hago es que cuando onchange() ejecute una función javascript, en mi pc funciona bien, pero en el servidor me da este error: Uncaught ReferenceError: calcularSubtotal is not defined at HTMLInputElement.onchange<br /><br />gracias por adelantado<p><a href="http://foros.cristalab.com/error-llamada-onchange-a-script-t120726/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Fri, 08 Mar 2019 03:13:39</pubDate>
	    </item>
	    <item>
    	    <title>Alguien sabe cómo desarrollar un sitio como éste</title>
        	<link>http://foros.cristalab.com/alguien-sabe-como-desarrollar-un-sitio-como-este-t120620/</link>
			<guid>http://foros.cristalab.com/alguien-sabe-como-desarrollar-un-sitio-como-este-t120620/</guid>
	        <description><![CDATA[ Hola ¿Alguien sabe cómo desarrollar un sitio como éste? De antemano mil y mil gracias. El link es el siguiente:<br />
<br />
http://leonelarce1.wixsite.com/misitio... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ Hola ¿Alguien sabe cómo desarrollar un sitio como éste? De antemano mil y mil gracias. El link es el siguiente:<br /><br />http://leonelarce1.wixsite.com/misitio<p><a href="http://foros.cristalab.com/alguien-sabe-como-desarrollar-un-sitio-como-este-t120620/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Tue, 19 Feb 2019 10:34:16</pubDate>
	    </item>
	    <item>
    	    <title>al activar casilla de verificacion aparezca texto en campo de Formular</title>
        	<link>http://foros.cristalab.com/al-activar-casilla-de-verificacion-aparezca-texto-en-campo-de-formular-t120563/</link>
			<guid>http://foros.cristalab.com/al-activar-casilla-de-verificacion-aparezca-texto-en-campo-de-formular-t120563/</guid>
	        <description><![CDATA[ Hola a todos como están, espero me puedan ayudar, necesito un script que haga que en un formulario donde este un campo de texto y a su lado una casilla de verificación y que al seleccionarla (chekbox) salga un texto en su campo (el que esta al lado) Muchas gracias...... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ Hola a todos como están, espero me puedan ayudar, necesito un script que haga que en un formulario donde este un campo de texto y a su lado una casilla de verificación y que al seleccionarla (chekbox) salga un texto en su campo (el que esta al lado) Muchas gracias...<p><a href="http://foros.cristalab.com/al-activar-casilla-de-verificacion-aparezca-texto-en-campo-de-formular-t120563/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Mon, 11 Feb 2019 06:50:51</pubDate>
	    </item>
	    <item>
    	    <title>Buenas noches, alguien me podría dar una manito con este error</title>
        	<link>http://foros.cristalab.com/buenas-noches-alguien-me-podria-dar-una-manito-con-este-error-t120406/</link>
			<guid>http://foros.cristalab.com/buenas-noches-alguien-me-podria-dar-una-manito-con-este-error-t120406/</guid>
	        <description><![CDATA[ Uncaught TypeError: Cannot read property 'style' of null<br />
<br />
Este error me sale al momento de querer mostrar un valor que tengo oculto con un display: none... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ Uncaught TypeError: Cannot read property 'style' of null<br /><br />Este error me sale al momento de querer mostrar un valor que tengo oculto con un display: none<p><a href="http://foros.cristalab.com/buenas-noches-alguien-me-podria-dar-una-manito-con-este-error-t120406/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Fri, 18 Jan 2019 19:51:42</pubDate>
	    </item>
	    <item>
    	    <title>Activar / Desactivar Dispositivos por Mac Address</title>
        	<link>http://foros.cristalab.com/activar-desactivar-dispositivos-por-mac-address-t120379/</link>
			<guid>http://foros.cristalab.com/activar-desactivar-dispositivos-por-mac-address-t120379/</guid>
	        <description><![CDATA[ Saludos, busco orientación un dispositivo Teléfono Móvil tiene una mac address, el para conectarse con un servicio que me dará un servidor se hará por medio de la mac address y una aplicación que hay que desarrollar para el Teléfono móvil para que funcione Cliente/Servidor, pero el usuario deberá ingresar esta mac addr... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ Saludos, busco orientación un dispositivo Teléfono Móvil tiene una mac address, el para conectarse con un servicio que me dará un servidor se hará por medio de la mac address y una aplicación que hay que desarrollar para el Teléfono móvil para que funcione Cliente/Servidor, pero el usuario deberá ingresar esta mac address inicialmente manual a través de la pagina web que tendrá el servidor para los registros para que el dispositivo se conecte al servicio que brindara el servidor, diciendo por ejemplo &quot; Se ha agregado el dispositivo correctamente MacAddress: xx:xx:xx:xx:xx:xx&quot;, <br />Como podría hacerse si al mes de no cancelar el servicio el sistema pueda bloquear la mac address del teléfono móvil.<br />Por donde lo trabajaría: php mysql jquery ajax javascript<p><a href="http://foros.cristalab.com/activar-desactivar-dispositivos-por-mac-address-t120379/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Mon, 14 Jan 2019 07:28:24</pubDate>
	    </item>
	    <item>
    	    <title>jqGrid con Tablas Relacionadas en MySQL</title>
        	<link>http://foros.cristalab.com/jqgrid-con-tablas-relacionadas-en-mysql-t120354/</link>
			<guid>http://foros.cristalab.com/jqgrid-con-tablas-relacionadas-en-mysql-t120354/</guid>
	        <description><![CDATA[ Buenas tardes,<br />
<br />
Estoy retomando php y javasvript después de mucho tiempo, y he usado el pluging jqGrid, para crear las grillas. Lo que he usado bien, para editar altas y modificar sin problema. El problema me lo encuentro, cuando quiero usar una tabla con datos relacionados.<br />
<br />
La tabla es las cuotas de unos afiliado... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[  Buenas tardes,<br /><br />Estoy retomando php y javasvript después de mucho tiempo, y he usado el pluging jqGrid, para crear las grillas. Lo que he usado bien, para editar altas y modificar sin problema. El problema me lo encuentro, cuando quiero usar una tabla con datos relacionados.<br /><br />La tabla es las cuotas de unos afiliados, que estan relacionadas con los propios afiliados. Para editar uso el formulario de jqgrid. He intentado poner un select, para que elijan el afiliado, pero no me carga los datos.<br />Le he dado muchas vueltas y no se que se me puede estar pasando. Decir que ando un poco oxidado. Perdón si hay fallos muy gordos.<br /><br />Os pongo my código. <br /><br /><br />Index.html:<br /><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint">&lt;script type=&quot;text/javascript&quot;&gt;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40;document&#41;.ready&#40;function&#40;&#41;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;jQuery&#40;&quot;#tblCuotas&quot;&#41;.jqGrid&#40;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;url&#58;'cargaCuotas.php',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editurl&#58; &quot;editCuotas.php&quot;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;datatype&#58; 'json',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;mtype&#58; 'POST',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;colModel&#58;&#91;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;label&#58; 'ID Cuota',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;name&#58; 'idCuota',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;index&#58;'idCuota',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;width&#58; 50,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;key&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editable&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;hidden&#58; true
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;label&#58; 'Num. Cuota',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;name&#58; 'NumD',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;index&#58;'NumD',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;width&#58; 50,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editable&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editoptions &#58; &#123; required&#58; true, placeholder&#58; &quot;Número de Cuota requieredo&quot;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;label&#58; 'Num. Afiliado',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;name&#58; 'NumAfiliado',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;index&#58;'NumAfiliado',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;width&#58; 150,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editable&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;edittype&#58; 'select',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;formatter&#58;'select',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editoptions &#58; &#123; dataurl&#58; 'afiliadosSelect.php' &#125;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editrules &#58; &#123; required&#58; true, placeholder&#58; &quot;Número de Cuota Afiliado&quot;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;label&#58; 'Nombre',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;name&#58; 'NOMBRE',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;index&#58;'NOMBRE',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;width&#58; 300,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editable&#58; true
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;label&#58; 'Cuota',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;name&#58; 'CUOTA',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;index&#58;'CUOTA',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;width&#58; 150,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editable&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editoptions &#58; &#123; required&#58; true, placeholder&#58; &quot;Importe de la cuota requieredo&quot;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;label&#58; 'Mes',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;name&#58; 'MES',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;index&#58;'MES',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;width&#58; 120,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editable&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editoptions &#58; &#123; &#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;label&#58; 'Año',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;name&#58; 'ANNO',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;index&#58;'ANNO',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;width&#58; 50,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editable&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editoptions &#58; &#123; &#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;label&#58; 'Pago',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;name&#58; 'PAGO',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;index&#58;'PAGO',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;width&#58; 50,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editable&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;edittype&#58; 'select',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editoptions &#58; &#123; value&#58; &quot;Y&#58;SI;N&#58;NO&quot; &#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;label&#58; 'Forma Pago',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;name&#58; 'FormaPago',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;index&#58;'FormaPago',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;width&#58; 100,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editable&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editoptions &#58; &#123; &#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#93;,&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;loadonce&#58; false,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;width&#58; window.innerWidth-20,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;height&#58; window.innerHeight-150,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;pager&#58; '#paginacion',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;rowNum&#58; 50,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;rowList&#58;&#91;50,100,150&#93;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;sortname&#58; 'NumD',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;sortorder&#58; 'asc',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;viewrecords&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;caption&#58; 'CUOTAS'
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;&#41;;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;jQuery&#40;&quot;#tblCuotas&quot;&#41;.jqGrid&#40;'navGrid','#paginacion',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#123;edit&#58;true,add&#58;true,del&#58;true&#125;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// options for the Edit Dialog
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;html5Check &#58;&nbsp; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;editCaption&#58; &quot;The Edit Dialog&quot;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;recreateForm&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;checkOnUpdate &#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;checkOnSubmit &#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;closeAfterEdit&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;reloadAfterEdit&#58;true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;reloadAfterSubmit&#58;true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;errorTextFormat&#58; function &#40;data&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return 'Error&#58; ' + data.responseText
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#125;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;buttons &#58; &#91;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;side &#58; &quot;right&quot;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;text &#58; &quot;Afiliado&quot;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;position &#58; &quot;first&quot;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;click &#58; function&#40; form, params, event&#41; &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;alert&#40;&quot;Custom action in search form&quot;&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#93;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#125;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// options for the Add Dialog
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;closeAfterAdd&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;html5Check &#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;recreateForm&#58; true,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;errorTextFormat&#58; function &#40;data&#41; &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;return 'Error&#58; ' + data.responseText
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// options for the Delete Dailog
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;errorTextFormat&#58; function &#40;data&#41; &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;return 'Error&#58; ' + data.responseText
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;&#41;;


&nbsp; &nbsp;&nbsp; &nbsp;&lt;/script&gt;</pre><br /><br />afiliadosSelect.php:<br /><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint">
&lt;?php
&nbsp; &nbsp; include &quot;../class/tAfiliados.php&quot;;

&nbsp; &nbsp;echo '&lt;script&gt;alert&#40;&quot;Custom action in search form&quot;&#41;;&lt;/script&gt;';
&nbsp; &nbsp;$oAfiliado = new tAfiliados&#40;1, 0, 1, 1&#41;;
&nbsp; &nbsp;$respuesta = $oAfiliado-&gt;selectAfiliados&#40;&#41;;
&nbsp; &nbsp;

&nbsp; &nbsp; echo $respuesta;
?&gt;</pre><br /><br />tAfiliados.php:<br /><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint">&lt;?php

include 'tMySQL.php';
 

class tAfiliados
&#123;
&nbsp; &nbsp;
&nbsp; &nbsp;public function selectAfiliados&#40;&#41;
&nbsp; &nbsp;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;$oMySQL = new tMySQL&#40;&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;if &#40;$oMySQL-&gt;bConnect&#41;
&nbsp; &nbsp;&nbsp; &nbsp;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$cSQL =&quot;SELECT COUNT&#40;*&#41; AS cuantos FROM afiliados WHERE borrado=0&quot;;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$this-&gt;fila = $oMySQL-&gt;countQuery&#40;$cSQL&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$this-&gt;cuantos = $this-&gt;fila&#91;'cuantos'&#93;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$query = &quot;SELECT idAfiliado, NumAfiliado, NOMBRE FROM afiliados WHERE borrado=0 ORDER BY NOMBRE&quot;; 
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$result = $oMySQL-&gt;GetQuery&#40;$query&#41;;

&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$response ='&lt;select&gt;';
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$i=0;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;while&#40; $i &lt;= $this-&gt;cuantos &#41; &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$response .= '&lt;option value=&quot;'.$result&#91;$i&#93;&#91;'NumAfiliado'&#93;.'&quot;&gt;'.$result&#91;$i&#93;&#91;'NOMBRE'&#93;.'&lt;/option&gt;';
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$i++;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$response .= '&lt;/select&gt;';
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;$oMySQL-&gt;Close&#40;&#41;;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;return $response;
&nbsp; &nbsp;&#125;
&#125;

?&gt;</pre><br /><br />Un saludo y muchas gracias por adelantado.<p><a href="http://foros.cristalab.com/jqgrid-con-tablas-relacionadas-en-mysql-t120354/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Tue, 08 Jan 2019 10:53:53</pubDate>
	    </item>
	    <item>
    	    <title>Problema para guardar salida Json/Ajax en variable PHP</title>
        	<link>http://foros.cristalab.com/problema-para-guardar-salida-json-ajax-en-variable-php-t120191/</link>
			<guid>http://foros.cristalab.com/problema-para-guardar-salida-json-ajax-en-variable-php-t120191/</guid>
	        <description><![CDATA[ Estimados, tengo un problema, la respuesta json/ajax la puedo imprimir en el id de un span, pero no puedo guardar en una variable php esa respuesta. Cómo almaceno cada elemento del json en una variable php?<br />
<br />
El formulario:<br />
<form id="form"><br />
<input type="text" id="nombre" placeh... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[  Estimados, tengo un problema, la respuesta json/ajax la puedo imprimir en el id de un span, pero no puedo guardar en una variable php esa respuesta. Cómo almaceno cada elemento del json en una variable php?<br /><br /><strong>El formulario:</strong><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint lang-html">&lt;form id=&quot;form&quot;&gt;
&lt;input type=&quot;text&quot; id=&quot;nombre&quot; placeholder=&quot;Nombre&quot; &gt;
&lt;input type=&quot;text&quot; id=&quot;apellido&quot; placeholder=&quot;Apellido&quot; &gt;
&lt;input type=&quot;number&quot; id=&quot;edad&quot; placeholder=&quot;Edad&quot; &gt;
&lt;input type=&quot;submit&quot; name=&quot;enviar&quot; id=&quot;enviar&quot; value=&quot;Enviar&quot;&gt;
&lt;/form&gt;
&lt;hr&gt;
&lt;p&gt;Name&#58; &lt;span id=&quot;myName&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Apellido&#58; &lt;span id=&quot;myApellido&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Edad&#58; &lt;span id=&quot;myEdad&quot;&gt;&lt;/span&gt;&lt;/p&gt;
</pre><br /><br /><strong>Llamada Ajax</strong><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint lang-js">
&lt;script type=&quot;text/javascript&quot;&gt;
$&#40;&quot;#enviar&quot;&#41;.click&#40;function&#40;e&#41; &#123;
&nbsp; &nbsp;e.preventDefault&#40;&#41;;
&nbsp; &nbsp;var nombre = $&#40;&quot;#nombre&quot;&#41;.val&#40;&#41;,
&nbsp; &nbsp;apellido = $&#40;&quot;#apellido&quot;&#41;.val&#40;&#41;,
&nbsp; &nbsp;edad = $&#40;&quot;#edad&quot;&#41;.val&#40;&#41;,

&nbsp; &nbsp;//&quot;nombre del parámetro POST&quot;&#58;valor &#40;el cual es el objeto guardado en las variables de arriba&#41;
&nbsp; &nbsp;datos = &#123;&quot;nombre&quot;&#58;nombre, &quot;apellido&quot;&#58;apellido,&quot;edad&quot;&#58;edad&#125;;

&nbsp; &nbsp;$.ajax&#40;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;url&#58; &quot;procesa.php&quot;,
&nbsp; &nbsp;&nbsp; &nbsp;type&#58; &quot;POST&quot;,
&nbsp; &nbsp;&nbsp; &nbsp;dataType&#58; 'json',
&nbsp; &nbsp;&nbsp; &nbsp;data&#58; datos
&nbsp; &nbsp;&#125;&#41;.done&#40;function&#40;respuesta&#41;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;if &#40;respuesta.estado === &quot;ok&quot;&#41; &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; $&#40;'#myName'&#41;.text&#40;respuesta.nombre&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$&#40;'#myApellido'&#41;.text&#40;respuesta.apellido&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$&#40;'#myEdad'&#41;.text&#40;respuesta.edad&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&#125;&#41;;
&#125;&#41;;
&lt;/script&gt;
</pre><br /><br /><strong>El archivo procesa.php</strong><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint lang-php">
&lt;?php
//Obtenemos los datos de los input
$nombre = $_POST&#91;&quot;nombre&quot;&#93;;
$apellido = $_POST&#91;&quot;apellido&quot;&#93;;
$edad = $_POST&#91;&quot;edad&quot;&#93;;

//Hacemos las comprobaciones que sean necesarias... &#40;sanitizar los textos para evitar XSS e inyecciones de código, comprobar que la edad sea un número, etc.&#41;
//Omitido para la brevededad del código
//PERO NO OLVIDES QUE ES ALGO IMPORTANTE.

//Seteamos el header de &quot;content-type&quot; como &quot;JSON&quot; para que jQuery lo reconozca como tal
header&#40;'Content-Type&#58; application/json'&#41;;
//Guardamos los datos en un array
$datos = array&#40;
'estado' =&gt; 'ok',
'nombre' =&gt; $nombre, 
'apellido' =&gt; $apellido, 
'edad' =&gt; $edad
&#41;;
//Devolvemos el array pasado a JSON como objeto
echo json_encode&#40;$datos, JSON_FORCE_OBJECT&#41;;
?&gt;
</pre><br /><br />El sistema funciona perfecto, publicando las respuestas en el id de los span que están bajo el form. Pero lo que quiero es guardar cada cada valor de la clave json en una variable php. He probado lo siguiente pero no funciona.<br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint lang-php">
&#93;echo $_POST&#91;&quot;nombre&quot;&#93;; //Tomando el nombre de la key nombre del json. No funciona.
echo $_POST&#91;&quot;myName&quot;&#93;; //El id de la respuesta. No funciona.
</pre><br />Dónde está mi error?<p><a href="http://foros.cristalab.com/problema-para-guardar-salida-json-ajax-en-variable-php-t120191/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Mon, 10 Dec 2018 21:28:17</pubDate>
	    </item>
	    <item>
    	    <title>Radio botones con onclick</title>
        	<link>http://foros.cristalab.com/radio-botones-con-onclick-t120153/</link>
			<guid>http://foros.cristalab.com/radio-botones-con-onclick-t120153/</guid>
	        <description><![CDATA[ Estoy elaborando un pequeño programna en php y utilizo radio buttons, pero deseo que una vez que el usuario haga click (onclick en javascript) el programa continue sin necesidad de pulsar el botón "Continuar".<br />
He probado con javascript (onclick y continue), pero sin éxito.<br />
Agradezco toda la ayuda que tengan... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ Estoy elaborando un pequeño programna en php y utilizo radio buttons, pero deseo que una vez que el usuario haga click (onclick en javascript) el programa continue sin necesidad de pulsar el botón &quot;Continuar&quot;.<br />He probado con javascript (onclick y continue), pero sin éxito.<br />Agradezco toda la ayuda que tengan a bien prestarme.<br />Saludos.<br /><br />Carlos<p><a href="http://foros.cristalab.com/radio-botones-con-onclick-t120153/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Mon, 03 Dec 2018 06:34:28</pubDate>
	    </item>
	    <item>
    	    <title>Unir dos funciones en un solo botón para Cronometro en JavaScript</title>
        	<link>http://foros.cristalab.com/unir-dos-funciones-en-un-solo-boton-para-cronometro-en-javascript-t119955/</link>
			<guid>http://foros.cristalab.com/unir-dos-funciones-en-un-solo-boton-para-cronometro-en-javascript-t119955/</guid>
	        <description><![CDATA[ Buen dia a todos!!!...Estoy iniciado en programación de JavaScript y me dejaron hacer un cronómetro con JavaScript, con tres botones: Start, Stop y Reset, lo hice, y todo funciona a la perfección. Pero ahora debo unir las funciones de Start y Stop en un solo botón, pero no tengo idea de cómo hacerlo, alguien podría ayu... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ Buen dia a todos!!!...Estoy iniciado en programación de JavaScript y me dejaron hacer un cronómetro con JavaScript, con tres botones: Start, Stop y Reset, lo hice, y todo funciona a la perfección. Pero ahora debo unir las funciones de Start y Stop en un solo botón, pero no tengo idea de cómo hacerlo, alguien podría ayudarme por favor...!!! y también debo hacer como un historial, que vaya guardando el tiempo de cada vez que lo reinicio... Necesito ayuda por favor. Ese es mi código de lo que funciona perfectamente con los tres botones:<br />_________CODIGO HTML__________<br />&lt;div class=&quot;containerTime d-flex&quot;&gt;<br />					&lt;h2 id=&quot;horas&quot; class=&quot;display-2&quot;&gt;00&lt;/h2&gt;<br />					&lt;h2 id=&quot;minutos&quot; class=&quot;display-2&quot;&gt;:00&lt;/h2&gt;<br />					&lt;h2 id=&quot;segundos&quot; class=&quot;display-2&quot;&gt;:00&lt;/h2&gt;<br />					&lt;h2 id=&quot;centesimas&quot; class=&quot;display-2&quot;&gt;:00&lt;/h2&gt;<br />				&lt;/div&gt;&lt;!--containerTime--&gt;<br />				&lt;div class=&quot;containerButtons d-flex justify-content-around&quot;&gt;<br />	 				&lt;button id=&quot;btnStart&quot; class=&quot;btn btn-success&quot;&gt;Start&lt;/button&gt;<br />					&lt;button id=&quot;btnStop&quot; class=&quot;btn btn-danger&quot;&gt;Stop&lt;/button&gt;<br />					&lt;button id=&quot;btnReset&quot; class=&quot;btn btn-primary&quot;&gt;Reset&lt;/button&gt;<br />				&lt;/div&gt;&lt;!--containerButtons--&gt;<br /><br />_________CODIGO JS__________<br />var hundredths = 0;<br />var seconds = 0;<br />var minutes = 0;<br />var hours = 0;<br /><br />var btnStart = document.getElementById('btnStart');<br />var btnStop = document.getElementById('btnStop');<br />var btnReset = document.getElementById('btnReset');<br /><br />var hundredthsHTML = document.getElementById('centesimas');<br />var secondsHTML = document.getElementById('segundos');<br />var minutesHTML = document.getElementById('minutos');<br />var hoursHTML = document.getElementById('horas');<br />var exe = &quot;&quot;;<br /><br />function cronometro() {<br />	if(hundredths &lt; 99) {<br />	   hundredths++;<br />		hundredths = ((hundredths &lt; 10) ? &quot;0&quot; : &quot;&quot;) + hundredths;<br />		hundredthsHTML.innerHTML = &quot;:&quot; + hundredths;<br />	}<br />	<br />	if (hundredths == 99) { hundredths = -1; }<br />	<br />	if (hundredths == 0) {<br />		seconds++;<br />		seconds = ((seconds &lt; 10) ? &quot;0&quot; : &quot;&quot;) + seconds;<br />		secondsHTML.innerHTML = &quot;:&quot; + seconds;<br />	}<br />	<br />	if (seconds == 59) { seconds = -1; }<br />	<br />	if (seconds == 0 &amp;&amp; hundredths == 0) {<br />		minutes++;<br />		minutes = ((minutes &lt; 10) ? &quot;0&quot; : &quot;&quot; ) + minutes;<br />		minutesHTML.innerHTML = &quot;:&quot; + minutes;<br />	}<br />	<br />	if ( minutes == 59) { minutes = -1; }<br />	<br />	if ( minutes == 0 &amp;&amp; seconds == 0 &amp;&amp; hundredths == 0 ) { <br />		hours++;<br />		hours = ((hours &lt; 10) ? &quot;0&quot; : &quot;&quot;) + hours;<br />		hoursHTML.innerHTML = hours;<br />	}<br />}<br /><br />function start() {<br />	exe = setInterval(cronometro, 10);<br />	btnStart.disabled = true;<br />	btnStop.disabled = false;<br />	btnReset.disabled = false;<br />}<br /><br />function stop() {<br />	clearInterval(exe);<br />	btnStart.disabled = false;<br />}<br /><br />function reset() {<br />	clearInterval(exe);<br />	btnStart.disabled = false;<br />	hundredths = 0;<br />	seconds = 0;<br />	minutes = 0;<br />	hours = 0;<br />	<br />	hundredthsHTML.innerHTML = &quot;:00&quot;;<br />	secondsHTML.innerHTML = &quot;:00&quot;;<br />	minutesHTML.innerHTML = &quot;:00&quot;;<br />	hoursHTML.innerHTML = &quot;00&quot;;<br />}<br /><br />document.getElementById('btnStart').addEventListener('click', start);<br />document.getElementById('btnStop').addEventListener('click', stop);<br />document.getElementById('btnReset').addEventListener('click', reset);<p><a href="http://foros.cristalab.com/unir-dos-funciones-en-un-solo-boton-para-cronometro-en-javascript-t119955/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Wed, 26 Sep 2018 11:23:54</pubDate>
	    </item>
	    <item>
    	    <title>¿Alguien sabe como hacer este menú parallax ?</title>
        	<link>http://foros.cristalab.com/alguien-sabe-como-hacer-este-menu-parallax--t119921/</link>
			<guid>http://foros.cristalab.com/alguien-sabe-como-hacer-este-menu-parallax--t119921/</guid>
	        <description><![CDATA[ El menú de esta página me parece que luce bien.  no sé si de casualidad alguien sepa como se hace este tipo de menú (que librería de java se debe utilizar) para que al realizar el efecto parallax el menú se vaya deslizando sobre cierto objeto como en este ejemplo: http://engranestudio.com/<br />
<br />
Un saludo y de antemano gr... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ El menú de esta página me parece que luce bien.  no sé si de casualidad alguien sepa como se hace este tipo de menú (que librería de java se debe utilizar) para que al realizar el efecto parallax el menú se vaya deslizando sobre cierto objeto como en este ejemplo: <a href="http://engranestudio.com/" target="_blank">http://engranestudio.com/</a><br /><br />Un saludo y de antemano gracias por su ayuda.<p><a href="http://foros.cristalab.com/alguien-sabe-como-hacer-este-menu-parallax--t119921/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Wed, 12 Sep 2018 19:58:01</pubDate>
	    </item>
	    <item>
    	    <title>Descargar Sublime Text 3.1.4</title>
        	<link>http://foros.cristalab.com/descargar-sublime-text-3.1.4-t119913/</link>
			<guid>http://foros.cristalab.com/descargar-sublime-text-3.1.4-t119913/</guid>
	        <description><![CDATA[ Sería alguien tan amable de decirme desde dónde descargar la última versión de Sublime Text. No menor a 3.1? Softonic ofrece un "beta 2. y algo" y los otros sitios no son muy confiables. Gracias, espero tener alguna respuesta. Buenas noches... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ Sería alguien tan amable de decirme desde dónde descargar la última versión de Sublime Text. No menor a 3.1? Softonic ofrece un &quot;beta 2. y algo&quot; y los otros sitios no son muy confiables. Gracias, espero tener alguna respuesta. Buenas noches<p><a href="http://foros.cristalab.com/descargar-sublime-text-3.1.4-t119913/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Sun, 09 Sep 2018 18:15:28</pubDate>
	    </item>
	    <item>
    	    <title>Editar el menú de una web responsive para que aparezca desplegado</title>
        	<link>http://foros.cristalab.com/editar-el-menu-de-una-web-responsive-para-que-aparezca-desplegado-t119893/</link>
			<guid>http://foros.cristalab.com/editar-el-menu-de-una-web-responsive-para-que-aparezca-desplegado-t119893/</guid>
	        <description><![CDATA[ Hola, estoy editando una web en wordpress. El problema está cuando abro la web en moviles, ya que al ser responsive el menú se contrae y aparece un botón de menú.<br />
<br />
Lo que quiero hacer es que el menú aparezca desplegado desde un comienzo cuando entran por moviles.<br />
<br />
(function( $ ){<br />
   &quo... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[  Hola, estoy editando una web en wordpress. El problema está cuando abro la web en moviles, ya que al ser responsive el menú se contrae y aparece un botón de menú.<br /><br />Lo que quiero hacer es que el menú aparezca desplegado desde un comienzo cuando entran por moviles.<br /><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint">&#40;function&#40; $ &#41;&#123;
&nbsp; &nbsp;&quot;use strict&quot;;
&nbsp; &nbsp;
&nbsp; &nbsp;$.fn.mfnMenu = function&#40; options &#41;&#123;

&nbsp; &nbsp;&nbsp; &nbsp;var menu = $&#40;this&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;var defaults = &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;addLast&nbsp; &nbsp;&nbsp; &nbsp;&#58; false,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;arrows&nbsp; &nbsp; &nbsp; &#58; false,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;delay&nbsp; &nbsp; &nbsp; &nbsp;&#58; 100,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;hoverClass&nbsp; &#58; 'hover',
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;mobileInit&nbsp; &nbsp;&#58; 768,
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;responsive&nbsp; &nbsp;&#58; true
&nbsp; &nbsp;&nbsp; &nbsp;&#125;;
&nbsp; &nbsp;&nbsp; &nbsp;options = $.extend&#40; defaults, options &#41;;
&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;var init = function&#40;&#41;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// add '.submenu' class
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40; 'li&#58;has&#40;ul&#41;', menu &#41;.addClass&#40; 'submenu' &#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// append mobile toggle button
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40; 'li&#58;has&#40;ul&#41;', menu &#41;.append&#40; '&lt;span class=&quot;menu-toggle&quot;&gt;&lt;/span&gt;' &#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// add '.mfn-megamenu-parent' class
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;menu.children&#40; 'li&#58;has&#40; ul.mfn-megamenu &#41;' &#41;.addClass&#40; 'mfn-megamenu-parent' &#41;;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// add '.last-item' class
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40; '.submenu ul li&#58;last-child', menu &#41;.addClass&#40; 'last-item' &#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// add '.last' class
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if&#40; options.addLast &#41; &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40; '&gt; li&#58;last-child', menu &#41;.addClass&#40; 'last' &#41;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.prev&#40;&#41;.addClass&#40; 'last' &#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// appand submenu arrows
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if&#40; options.arrows &#41; &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40; 'li ul li&#58;has&#40;ul&#41; &gt; a', menu &#41;.append&#40; '&lt;i class=&quot;menu-arrow icon-right-open&quot;&gt;&lt;/i&gt;' &#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;

&nbsp; &nbsp;&nbsp; &nbsp;&#125;;
&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;var doMenu = function&#40;&#41;&#123;

&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if&#40; &#40; window.innerWidth &gt;= options.mobileInit &#41; || &#40; ! options.responsive &#41; &#41;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// desktop --------------------------------

&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40; '&gt; li, ul&#58;not&#40;.mfn-megamenu&#41; li', menu &#41;.hover&#40;function&#40;&#41; &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40;this&#41;.stop&#40;true,true&#41;.addClass&#40; options.hoverClass &#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40;this&#41;.children&#40; 'ul' &#41;.stop&#40;true,true&#41;.fadeIn&#40; options.delay &#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;, function&#40;&#41;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40;this&#41;.stop&#40;true,true&#41;.removeClass&#40; options.hoverClass &#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40;this&#41;.children&#40; 'ul' &#41;.stop&#40;true,true&#41;.fadeOut&#40; options.delay &#41;;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125; else &#123;

&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// mobile ---------------------------------
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40; 'li', menu &#41;.unbind&#40;'hover'&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$&#40; 'li &gt; .menu-toggle', menu &#41;.off&#40;'click'&#41;.on&#40;'click', function&#40;&#41;&#123;
&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;var el = $&#40;this&#41;.closest&#40;'li'&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if&#40; el.hasClass&#40; options.hoverClass &#41; &#41;&#123;
&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;el.removeClass&#40; options.hoverClass &#41;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.children&#40;'ul'&#41;.stop&#40;true,true&#41;.fadeOut&#40; options.delay &#41;;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125; else &#123;
&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;el.addClass&#40; options.hoverClass &#41;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.children&#40;'ul'&#41;.stop&#40;true,true&#41;.fadeIn&#40; options.delay &#41;;&nbsp; &nbsp;
&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;&#125;;
&nbsp; &nbsp;&nbsp; &nbsp;

&nbsp; &nbsp;&nbsp; &nbsp;$&#40;window&#41;.bind&#40; 'resize', doMenu &#41;;
&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;var __constructor = function&#40;&#41;&#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;init&#40;&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;doMenu&#40;&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;&#125;;
&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;__constructor&#40;&#41;;

&nbsp; &nbsp;&#125;;

&#125;&#41;&#40;jQuery&#41;;</pre><p><a href="http://foros.cristalab.com/editar-el-menu-de-una-web-responsive-para-que-aparezca-desplegado-t119893/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Mon, 03 Sep 2018 12:37:37</pubDate>
	    </item>
	    <item>
    	    <title>El carrito de compras no muestra el articulo</title>
        	<link>http://foros.cristalab.com/el-carrito-de-compras-no-muestra-el-articulo-t119887/</link>
			<guid>http://foros.cristalab.com/el-carrito-de-compras-no-muestra-el-articulo-t119887/</guid>
	        <description><![CDATA[ var content;<br />
var id;<br />
var nombre;<br />
var marca;<br />
var precio;<br />
$(document).ready(function() {<br />
listar();<br />
var nombreBusqueda;<br />
<br />
 $("#nombre").keyup(function() {<br />
            <br />
        nombreBusqueda... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[  <p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint lang-js">var content;
var id;
var nombre;
var marca;
var precio;
$&#40;document&#41;.ready&#40;function&#40;&#41; &#123;
listar&#40;&#41;;
var nombreBusqueda;

 $&#40;&quot;#nombre&quot;&#41;.keyup&#40;function&#40;&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; nombreBusqueda=$&#40;&quot;#nombre&quot;&#41;.val&#40;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; filtrar&#40;nombreBusqueda&#41;;
&nbsp; &nbsp; &#125;
&#41;;
&nbsp; var id;
&nbsp; var nombre;
&nbsp; var marca;
&nbsp; var producto;
&nbsp; &nbsp; var precio;
// Detectar clic en una fila
$&#40;&quot;#resultado tbody&quot;&#41;.click&#40;function&#40;event&#41; &#123;
&nbsp; $&#40;&quot;tr&quot;&#41;.click&#40;function&#40;event&#41; &#123;
 id = $&#40;this&#41;.find&#40;&quot;td&#58;first-child&quot;&#41;.text&#40;&#41;;
 nombre = $&#40;this&#41;.children&#40;'td'&#41;.eq&#40;1&#41;.text&#40;&#41;;
 marca = $&#40;this&#41;.children&#40;'td'&#41;.eq&#40;2&#41;.text&#40;&#41;;
 precio = $&#40;this&#41;.children&#40;'td'&#41;.eq&#40;4&#41;.text&#40;&#41;;
 producto = nombre + &quot;&nbsp; &quot; +&nbsp; marca;
$&#40;&quot;#nombreselec&quot;&#41;.val&#40;producto&#41;;

&#125;&#41;;
 
&#125;&#41;;
$&#40;&quot;#Agregar&quot;&#41;.click&#40;function&#40;event&#41;&#123;
&nbsp; var cantidad=$&#40;&quot;#CANTIDAD&quot;&#41;.val&#40;&#41;; 
&nbsp; if &#40;cantidad!==&quot;&quot;&#41;&#123;
&nbsp; &nbsp; var accion = &quot;agregar&quot;;
&nbsp; &nbsp; $.ajax&#40;&#123;
&nbsp; &nbsp;&nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; type&#58; &quot;POST&quot;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url&#58; &quot;../gestionweb/includes/php/procesoDetalle.php&quot;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; data&#58; &#123;&quot;accion&quot;&#58;accion,&quot;id&quot;&#58;id,&quot;cantidad&quot;&#58;cantidad,&quot;nombre&quot;&#58;nombre,&quot;marca&quot;&#58;marca,&quot;precio&quot;&#58;precio&#125;, 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; dataType&#58;'html',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error&#58; function&#40;&#41;&#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alert&#40;&quot;error petición ajax&quot;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; success&#58; function&#40;data&#41;&#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;console.log&#40;data&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &nbsp; &nbsp; &#125;&#41;.fail&#40; function&#40; jqXHR, textStatus, errorThrown &#41; &#123;

&nbsp; if &#40;jqXHR.status === 0&#41; &#123;

&nbsp; &nbsp; alert&#40;'Not connect&#58; Verify Network.'&#41;;

&nbsp; &#125; else if &#40;jqXHR.status == 404&#41; &#123;

&nbsp; &nbsp; alert&#40;'Requested page not found &#91;404&#93;'&#41;;

&nbsp; &#125; else if &#40;jqXHR.status == 500&#41; &#123;

&nbsp; &nbsp; alert&#40;'Internal Server Error &#91;500&#93;.'&#41;;

&nbsp; &#125; else if &#40;textStatus === 'parsererror'&#41; &#123;

&nbsp; &nbsp; alert&#40;'Requested JSON parse failed.'&#41;;

&nbsp; &#125; else if &#40;textStatus === 'timeout'&#41; &#123;

&nbsp; &nbsp; alert&#40;'Time out error.'&#41;;

&nbsp; &#125; else if &#40;textStatus === 'abort'&#41; &#123;

&nbsp; &nbsp; alert&#40;'Ajax request aborted.'&#41;;

&nbsp; &#125; else &#123;

&nbsp; &nbsp; alert&#40;'Uncaught Error&#58; ' + jqXHR.responseText&#41;;

&nbsp; &#125;

&#125;&#41;;

&nbsp; &nbsp; 
&nbsp; &#125; else&#123;
&nbsp; &nbsp; alert&#40;&quot;ingrese cantidad&quot;&#41;;
&nbsp; &#125;
&#125;&#41;;

&#125;&#41;;


function filtrar&#40;dato&#41;&#123;
&nbsp; &nbsp; &nbsp; &nbsp; var filtrado=&#91;&#93;;
&nbsp; &nbsp; &nbsp; &nbsp; var existe;
&nbsp; &nbsp; for&#40;var i = 0; i &lt; content.length; i++&#41; &#123;
&nbsp; &nbsp; if &#40;content&#91;i&#93;.nombre.toLowerCase&#40;&#41;.indexOf&#40;dato.toLowerCase&#40;&#41;&#41;!=-1&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; filtrado.push&#40;content&#91;i&#93;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &#125;
&#125;
&nbsp; &nbsp; &nbsp;if &#40;filtrado.length&gt;0&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; $&#40;&quot;#resultado tbody&quot;&#41;.empty&#40;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for &#40;var i = 0; i &lt; filtrado.length; i++&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var newRow =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;tr&gt;&quot; +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;td&gt;&quot; + filtrado&#91;i&#93;.idproducto + &quot;&lt;/td&gt;&quot; +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;td&gt;&quot; + filtrado&#91;i&#93;.nombre + &quot;&lt;/td&gt;&quot; +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;td&gt;&quot; + filtrado&#91;i&#93;.marca + &quot;&lt;/td&gt;&quot; +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;td&gt;&quot; + filtrado&#91;i&#93;.categoria + &quot;&lt;/td&gt;&quot; +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;td&gt;&quot; + filtrado&#91;i&#93;.precio + &quot;&lt;/td&gt;&quot; +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;td&gt;&lt;input type='radio' id='&quot;+filtrado&#91;i&#93;.idproducto+&quot;' name='seleccion'/&gt;&lt;/td&gt;&quot;+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;/tr&gt;&quot;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $&#40;newRow&#41;.appendTo&#40;&quot;#resultado tbody&quot;&#41;;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;&#125;
 
&nbsp; &nbsp;
&nbsp; 
&#125;&#125;;
function listar&#40;&#41;&#123;

&nbsp; &nbsp; tipofiltro=&quot;todos&quot;;
&nbsp; &nbsp; $.ajax&#40;&#123;
&nbsp; &nbsp;&nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; type&#58; &quot;POST&quot;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url&#58; &quot;../gestionweb/includes/php/filtroP.php&quot;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; data&#58; &#123; &quot;tf&quot;&#58; tipofiltro&#125;, 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dataType&#58; &quot;json&quot;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error&#58; function&#40;&#41;&#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alert&#40;&quot;error petición ajax&quot;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; success&#58; function&#40;data&#41;&#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;content=data;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for &#40;var i = 0; i &lt; data.length; i++&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var newRow =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;tr&gt;&quot; +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;td&gt;&quot; + data&#91;i&#93;.idproducto + &quot;&lt;/td&gt;&quot; +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;td&gt;&quot; + data&#91;i&#93;.nombre + &quot;&lt;/td&gt;&quot; +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;td&gt;&quot; + data&#91;i&#93;.marca + &quot;&lt;/td&gt;&quot; +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;td&gt;&quot; + data&#91;i&#93;.categoria + &quot;&lt;/td&gt;&quot; +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;td&gt;&quot; + data&#91;i&#93;.precio + &quot;&lt;/td&gt;&quot; +
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;td&gt;&lt;input type='radio' id='&quot;+data&#91;i&#93;.idproducto+&quot;' name='seleccion'/&gt;&lt;/td&gt;&quot;+
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;/tr&gt;&quot;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $&#40;newRow&#41;.appendTo&#40;&quot;#resultado tbody&quot;&#41;;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; 

&nbsp; &nbsp; &nbsp; &nbsp; &#125;&nbsp; 
&#125;&#41;;
&#125;;
&nbsp; 

</pre><br /><br />Con el codigo de arriba tengo el boton agregar que añade un producto al ticket o carro de compras.<br /><br />Luego en procesodetalle.php tengo:<br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint lang-php">&lt;?php
session_start&#40;&#41;;

require &#40;&quot;../../models/claseTicket.php&quot;&#41;;


&nbsp; &nbsp; if &#40;isset&#40;$_POST&#91;'accion'&#93;&#41;&#41;&#123;
&nbsp; &nbsp;if &#40;$_POST&#91;'accion'&#93;==&quot;listar&quot;&#41;&#123;

&nbsp; &nbsp; if&#40;isset&#40;$_SESSION&#91;'carrito'&#93;&#41;&#41;&#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$carrito = $_SESSION&#91;'carrito'&#93;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo json_encode&#40;$carrito&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &#125;else&#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; $carrito = array&#40;&#41;;
&nbsp; &nbsp; &nbsp; echo json_encode&#40;$carrito&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; 
&nbsp; &nbsp; 
&nbsp; &nbsp;&#125;else if &#40;$_POST&#91;'accion'&#93;==&quot;agregar&quot;&#41;&#123;
&nbsp; &nbsp; &nbsp; &nbsp; $id = $_POST&#91;'id'&#93;;
&nbsp; &nbsp; &nbsp; &nbsp; $pu = $_POST&#91;'precio'&#93;;
&nbsp; &nbsp; &nbsp; &nbsp; $cant = $_POST&#91;'cantidad'&#93;;
&nbsp; &nbsp; &nbsp; &nbsp; $nom = $_POST&#91;'nombre'&#93;;
&nbsp; &nbsp; &nbsp; &nbsp; $detalle = new detalleTicket&#40;$id,$pu,$cant,$nom&#41;;
&nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; 
 
&nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;isset&#40;$_SESSION&#91;'carrito'&#93;&#41;&#41;&#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $carrito = $_SESSION&#91;'carrito'&#93;;
&nbsp; &nbsp; &nbsp; &nbsp; &#125; else &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $carrito = array&#40;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &nbsp; &nbsp; var_dump&#40;$carrito&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array_push&#40;$carrito, $detalle&#41;;
&nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; $_SESSION&#91;'carrito'&#93; = $carrito;
&nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &#125;
&nbsp; &nbsp; 
&nbsp; 
&nbsp; &nbsp;
&#125;&nbsp; &nbsp;


?&gt;</pre><br /><br />Pero me muestra undefined en las filas de la tabla de factura.<br />La verdad no se que puede ser.<p><a href="http://foros.cristalab.com/el-carrito-de-compras-no-muestra-el-articulo-t119887/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Sat, 01 Sep 2018 07:31:52</pubDate>
	    </item>
	    <item>
    	    <title>Generar JSON anidado con esta estructura</title>
        	<link>http://foros.cristalab.com/generar-json-anidado-con-esta-estructura-t119861/</link>
			<guid>http://foros.cristalab.com/generar-json-anidado-con-esta-estructura-t119861/</guid>
	        <description><![CDATA[ Hola buenas, <br />
<br />
estoy intentando aprender un poco mas de JS y su manejo de JSON. Sin embargo esty intentando generar un JSON con una estructura concreta y por ahora me estoy volviendo loco. <br />
<br />
La estructura que quiero es esta:<br />
<br />
{<br />
   "Nombre película":"spiderman",<br />
  &nbs... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[  Hola buenas, <br /><br />estoy intentando aprender un poco mas de JS y su manejo de JSON. Sin embargo esty intentando generar un JSON con una estructura concreta y por ahora me estoy volviendo loco. <br /><br />La estructura que quiero es esta:<br /><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint">&#123;
&nbsp; &nbsp;&quot;Nombre película&quot;&#58;&quot;spiderman&quot;,
&nbsp; &nbsp;&quot;num_de_secuelas&quot;&#58;3,
&nbsp; &nbsp;&quot;secuelas&quot;&#58;&#91;
&nbsp; &nbsp; &nbsp; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;nombre de la secuela&quot;&#58;&quot;nombre 1&quot;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;path&quot;&#58;&quot;/user/home/peliculas/Spiderman/nombre1&quot;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;start&quot;&#58;&quot;minuto de la primera escena &#40;omite el opening&#41;&quot;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;end&quot;&#58;&quot;Hora/minuto del final de la ultima escena &#40;omite los créditos finales&#41;&quot;
&nbsp; &nbsp; &nbsp; &#125;,
&nbsp; &nbsp; &nbsp; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;nombre de la secuela&quot;&#58;&quot;nombre 2&quot;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;path&quot;&#58;&quot;/user/home/peliculas/Spiderman/nombre2&quot;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;start&quot;&#58;&quot;minuto de la primera escena &#40;omite el opening&#41;&quot;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;end&quot;&#58;&quot;Hora/minuto del final de la ultima escena &#40;omite los créditos finales&#41;&quot;
&nbsp; &nbsp; &nbsp; &#125;,
&nbsp; &nbsp; &nbsp; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;nombre de la secuela&quot;&#58;&quot;nombre 1&quot;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;path&quot;&#58;&quot;/user/home/peliculas/Spiderman/nombre1&quot;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;start&quot;&#58;&quot;minuto de la primera escena &#40;omite el opening&#41;&quot;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;end&quot;&#58;&quot;Hora/minuto del final de la ultima escena &#40;omite los créditos finales&#41;&quot;
&nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp;&#93;
&#125;
</pre><br /><br />Todo se pasa en un index.html en el que el usuario va introduciendo inputs. El html que tengo es este:<br /><br /><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint lang-html">&lt;!DOCTYPE html&gt;

&lt;html&gt;

&lt;head&gt;
&nbsp; &nbsp; &lt;title&gt;Testing&lt;/title&gt;

&lt;/head&gt;

&lt;body&gt;
&nbsp; &nbsp; pelicula &#58; &lt;input type=&quot;text&quot; id=&quot;pelicula_nombre&quot; &gt;Secuelas &#58; &lt;input type=&quot;number&quot; id=&quot;secuela&quot; &gt; Folder &#58; &lt;input type=&quot;text&quot; id=&quot;path&quot; &gt;
&nbsp; &nbsp; &lt;button type=&quot;button&quot; onclick=&quot;createJson&#40;&#41;&quot;&gt;Create JSON&lt;/button&gt;
&nbsp; &nbsp; &lt;script&gt;
&nbsp; &nbsp; &nbsp; &nbsp; var Pelicula_json = &#91;&#93;;

&nbsp; &nbsp; &nbsp; &nbsp; function createJson&#40;&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var pelicula_nombre = document.getElementById&#40;&quot;pelicula_nombre&quot;&#41;.value;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var secuela = document.getElementById&#40;&quot;secuela&quot;&#41;.value;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var path = document.getElementById&#40;&quot;path&quot;&#41;.value;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var parts = &#91;&#93;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for &#40;var i = 0; i &lt; secuela; i++&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var part = &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;part_name&quot;&#58; &quot;Secuela 1&quot;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;carpeta&quot;&#58; &quot;ruta&quot;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; parts.push&#40;part&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;


&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var pelicula = &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;pelicula_nombre&quot;&#58; pelicula_nombre,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;secuela&quot;&#58; secuela,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;path&quot;&#58; path,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;parts&quot;&#58; parts
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Pelicula_json.push&#40;pelicula&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; console.log&#40;&quot;Pelicula json = &quot;, Pelicula_json&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &lt;/script&gt;
&lt;/body&gt;

&lt;/html&gt;
</pre><br /><br /><br />El output que obtengo es el siguiente:<br />[/img]https://imgur.com/a/alX1AXt)<br /><br /><br />Lo que pretendo es que basandonos en el numero introducido en secuelas, se generen los subcampos de carpeta, nombre de la secuela... de forma dinámica. <br /><br />Para eso he encontrado este código que no sé como implementar:<br /><br /><p class="datos_bloque"><strong>C&oacute;digo :</strong></p><pre class="prettyprint">&#91;html&#93;
&lt;html&gt;

&lt;head&gt;
&nbsp; &nbsp; &lt;script type='text/javascript'&gt;
&nbsp; &nbsp; &nbsp; &nbsp; function addFields&#40;&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Number of inputs to create
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var number = document.getElementById&#40;&quot;parts&quot;&#41;.value;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Container &lt;div&gt; where dynamic content will be placed
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var container = document.getElementById&#40;&quot;container&quot;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Clear previous contents of the container
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while &#40;container.hasChildNodes&#40;&#41;&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; container.removeChild&#40;container.lastChild&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for &#40;i = 0; i &lt; number; i++&#41; &#123;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Append a node with a random text
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; container.appendChild&#40;document.createTextNode&#40;&quot;Part &quot; + &#40;i + 1&#41;&#41;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Create an &lt;input&gt; element, set its type and name attributes
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var input = document.createElement&#40;&quot;input&quot;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; input.type = &quot;text&quot;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; input.name = &quot;wave-name&quot; + i;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; container.appendChild&#40;input&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Append a line break 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; container.appendChild&#40;document.createElement&#40;&quot;br&quot;&#41;&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
&nbsp; &nbsp; &lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&nbsp; &nbsp; &lt;input type=&quot;text&quot; id=&quot;wave-name&quot; name= &quot;wave-name&quot; value=&quot;&quot;&gt;Wave Name&lt;br&gt;
&nbsp; &nbsp; &lt;input type=&quot;number&quot; id=&quot;parts&quot; name=&quot;parts&quot; value=&quot;&quot;&gt;Number of Parts&lt;br &gt;
&nbsp; &nbsp; &lt;button id=&quot;filldetails&quot; onclick=&quot;addFields&#40;&#41;&quot; style=&quot;background-color&#58;green&quot;&gt;Fill Details&lt;/button&gt;
&nbsp; &nbsp; &lt;div id=&quot;container&quot; &gt;
&lt;/body&gt;

&lt;/html&gt;

&#91;/html&#93;</pre><br />¿Alguna ayuda?<br /><br />Gracias de antemano!! <img src="/foros/images/smiles/icon_sunrise.gif" alt=":D" border="0" /><br />Un saludo!<p><a href="http://foros.cristalab.com/generar-json-anidado-con-esta-estructura-t119861/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Sat, 25 Aug 2018 05:49:27</pubDate>
	    </item>
	    <item>
    	    <title>cargas en el mismo div varios botones</title>
        	<link>http://foros.cristalab.com/cargas-en-el-mismo-div-varios-botones-t119855/</link>
			<guid>http://foros.cristalab.com/cargas-en-el-mismo-div-varios-botones-t119855/</guid>
	        <description><![CDATA[ Hacer cargar en el mismo div varios botones como si fuera una botonera hecha en flash es decir que no salga de la página el problema es que necesito cargar imágenes de productos que están pre cargados en woomerce alguien sabe de un plugin que pueda hacer esto desde ya muchas gracias.... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ Hacer cargar en el mismo div varios botones como si fuera una botonera hecha en flash es decir que no salga de la página el problema es que necesito cargar imágenes de productos que están pre cargados en woomerce alguien sabe de un plugin que pueda hacer esto desde ya muchas gracias.<p><a href="http://foros.cristalab.com/cargas-en-el-mismo-div-varios-botones-t119855/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Thu, 23 Aug 2018 18:49:38</pubDate>
	    </item>
	    <item>
    	    <title>Cambiar option de un select desde el evento de otro elemento</title>
        	<link>http://foros.cristalab.com/cambiar-option-de-un-select-desde-el-evento-de-otro-elemento-t119828/</link>
			<guid>http://foros.cristalab.com/cambiar-option-de-un-select-desde-el-evento-de-otro-elemento-t119828/</guid>
	        <description><![CDATA[ Hola,<br />
Un cordial saludo, porque creo que es mi primera vez en este foro.<br />
Soy un programador aficionado, y hace unos días que me he quedado atascado en mi proyecto actual, por una cosa que parece tonta, pero que no logro resolver, me explico.<br />
Es la programación en javascript, en una web, todo siempre desde local.<br />
Es... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[ Hola,<br />Un cordial saludo, porque creo que es mi primera vez en este foro.<br />Soy un programador aficionado, y hace unos días que me he quedado atascado en mi proyecto actual, por una cosa que parece tonta, pero que no logro resolver, me explico.<br />Es la programación en javascript, en una web, todo siempre desde local.<br />Es una aplicación de cálculos acústicos.<br />Hago unos cálculos y pongo resultados en una tabla y en otros elementos.<br />Tengo un &quot;select&quot; con tres options y quiero escoger una option desde el programa en funcion del resultado de un càlculo.<br /><br />Para cambiar la option he probado con javascript i tambien con jquery, y en principio funciona bien, con:<br /><br />document.getElementById(&quot;zfin&quot;).value = '3';	  <br />(zfin es el id del select)<br /><br />Así selecciona la opción que tiene 3 en el value.... todo bien.<br /><br />Pero el problema viene cuando quiero hacer esto dentro de la función de un evento (el que dispara el cálculo) o desde una función llamada desde la función de un evento.<br />Por ejemplo:<br /><br />document.getElementById(&quot;f1mkt&quot;).onchange = function() {	<br />   alert(this.innerHTML);  //comprovación del evento, todo OK<br />  document.getElementById(&quot;zfin&quot;).value = '3';			<br />}<br />En este caso no hace nada.<br />(zfin&quot; és el id del select)<br /><br />Tambien lo he probado con jquery sin ningún resultado.<br /><br />Alguien podria darme una pista, por favor.<br /><br />Muchas gracias y un cordial saludo.<br /><br />Santi<p><a href="http://foros.cristalab.com/cambiar-option-de-un-select-desde-el-evento-de-otro-elemento-t119828/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Thu, 09 Aug 2018 10:39:19</pubDate>
	    </item>
	    <item>
    	    <title>Mostrar fecha y hora</title>
        	<link>http://foros.cristalab.com/mostrar-fecha-y-hora-t119820/</link>
			<guid>http://foros.cristalab.com/mostrar-fecha-y-hora-t119820/</guid>
	        <description><![CDATA[ Hola amigos como puedo mostrar fecha y hora, consegui un script pero no se como jalarlo a la pelicula solo funciona en la consola de salida<br />
function ObtenerFechaHora() {<br />
var date:Date=new Date();<br />
var fechaResultado:String=new String();<br />
var dias:Array=new Array('Lunes','Martes','Miércoles',<br />
'Jueves','Viernes','Sába... ]]></description>

	        <dc:creator>Cristalab</dc:creator>
	        
            <content:encoded><![CDATA[  Hola amigos como puedo mostrar fecha y hora, consegui un script pero no se como jalarlo a la pelicula solo funciona en la consola de salida<br />function ObtenerFechaHora() {<br />var date:Date=new Date();<br />var fechaResultado:String=new String();<br />var dias:Array=new Array('Lunes','Martes','Miércoles',<br />'Jueves','Viernes','Sábado','Domingo');<br />fechaResultado=dias[date.getDay()]+&quot; &quot;;<br />fechaResultado+=String(date.getDate())+&quot; de &quot;;<br />var meses:Array=new Array('Enero','Febrero','Marzo','Abril','Mayo','Junio',<br />'Julio','Agosto8','Septiembre','Octubre','Noviembre',<br />'Diciembre');<br />fechaResultado+=meses[date.getMonth()]+&quot; de &quot;+date.getFullYear();<br />fechaResultado+=&quot; a las &quot;+date.getHours()+&quot;:&quot;;<br />var minutos:String=String(date.getMinutes());<br />if(minutos.length==1){<br />minutos=&quot;0&quot;+minutos;<br />}<br />fechaResultado+=minutos;<br />return fechaResultado;<br />}<br />trace(ObtenerFechaHora());<p><a href="http://foros.cristalab.com/mostrar-fecha-y-hora-t119820/#enviar" title="Env&iacute;a tus comentarios de este art&iacute;lo"><img src="http://www.cristalab.com/images/general/enviar-comentario.png" alt="Enviar comentario" /></a></p> ]]></content:encoded>
	        <pubDate>Mon, 06 Aug 2018 09:24:40</pubDate>
	    </item>
	</channel>
</rss>