
Quote from Palamar on June 14, 2019, 12:29 pmHola!!!
Me explico, tengo esta rutina que introduce datos de una Bdd de forma dinámica, lo hace formando un HTML que mete luego en un container. De esta manera pues forma una grilla que muestra los datos. Lo hace muy bien para mi sorpresa, este es el código:
Loop 0 [ArtTotal] [loopart] SetVar [ArtNombre] [tableData([loopart])('nombre')] SetVar [Artcategoria] [tableData([loopart])('categ')] SetVar [ArtDescription] [tableData([loopart])('descript')] SetVar [ColocaHtml] "<figure class='elArt'><img src='muestra.jpg' alt='muestra'/><div class='entrar'> <i class='ion-android-add'></i><span>Entrar</span></div><figcaption><h6>[artcategoria]</h6><h3>[artnombre]</h3><p>[artdescription] </p><a href='#'></a></figure>" SetVar [ArmaHtml] "[armahtml][colocaHtml]" SetObjectHTML "articulos" "[armahtml]" endloopAhora bien, necesito saber cómo hacer para obtener los datos según el nombre (o en el caso de tener un id también). Por ejemplo el usuario hace clic en el primer elemento, ¿Cómo se yo el valor? Se me había ocurrido algo así en las propiedades de la página:
$(document).ready(function(){ $("#boton01").click(function(){ alert($("p").html()); }); });Pero claro, al generarse el html es siempre el mismo por lo que los Div se llaman iguales. SI pusiera Divs distintos tampoco sabría ya que puede haber 100 divs como 1000.
Por ejemplo yo debería tener una sentencia que dijera algo como:
Si el usuario hace clic en el ID100, entonces obtener datos.
Saludos y Gracias!.
ENG
I mean, I have this routine that introduces data from a Bdd dynamically, it does so by forming an HTML that is then placed in a container. In this way it forms a grid that shows the data. He does it very well to my surprise, this is the code:
************
Now, I need to know how to get the data according to the name (or in the case of having an id too). For example, the user clicks on the first item, How do I know the value? I had something like this in the properties of the page:
************
But of course, when the html is generated it is always the same, so the Div are called equal. IF I put different Divs I would not know either since there can be 100 divs like 1000.
For example, I should have a sentence that says something like: If the user clicks on the ID100, then get data.
Greetings and thanks!.
Hola!!!
Me explico, tengo esta rutina que introduce datos de una Bdd de forma dinámica, lo hace formando un HTML que mete luego en un container. De esta manera pues forma una grilla que muestra los datos. Lo hace muy bien para mi sorpresa, este es el código:
Loop 0 [ArtTotal] [loopart]
SetVar [ArtNombre] [tableData([loopart])('nombre')]
SetVar [Artcategoria] [tableData([loopart])('categ')]
SetVar [ArtDescription] [tableData([loopart])('descript')]
SetVar [ColocaHtml] "<figure class='elArt'><img src='muestra.jpg' alt='muestra'/><div class='entrar'> <i class='ion-android-add'></i><span>Entrar</span></div><figcaption><h6>[artcategoria]</h6><h3>[artnombre]</h3><p>[artdescription] </p><a href='#'></a></figure>"
SetVar [ArmaHtml] "[armahtml][colocaHtml]"
SetObjectHTML "articulos" "[armahtml]"
endloop
Ahora bien, necesito saber cómo hacer para obtener los datos según el nombre (o en el caso de tener un id también). Por ejemplo el usuario hace clic en el primer elemento, ¿Cómo se yo el valor? Se me había ocurrido algo así en las propiedades de la página:
$(document).ready(function(){
$("#boton01").click(function(){
alert($("p").html());
});
});
Pero claro, al generarse el html es siempre el mismo por lo que los Div se llaman iguales. SI pusiera Divs distintos tampoco sabría ya que puede haber 100 divs como 1000.
Por ejemplo yo debería tener una sentencia que dijera algo como:
Si el usuario hace clic en el ID100, entonces obtener datos.
Saludos y Gracias!.
ENG
I mean, I have this routine that introduces data from a Bdd dynamically, it does so by forming an HTML that is then placed in a container. In this way it forms a grid that shows the data. He does it very well to my surprise, this is the code:
************
Now, I need to know how to get the data according to the name (or in the case of having an id too). For example, the user clicks on the first item, How do I know the value? I had something like this in the properties of the page:
************
But of course, when the html is generated it is always the same, so the Div are called equal. IF I put different Divs I would not know either since there can be 100 divs like 1000.
For example, I should have a sentence that says something like: If the user clicks on the ID100, then get data.
Greetings and thanks!.

Quote from luishp on June 14, 2019, 4:46 pm@palamar please take a look at the attached sample app.
Let me know if you have any doubt.
Regards.
@palamar please take a look at the attached sample app.
Let me know if you have any doubt.
Regards.

Quote from Palamar on June 28, 2019, 4:20 pmNo había tenido la posibilidad de agradecerte todos estos aportes luishp. Gran trabajo, la demo es lo que buscaba hacer!. Saludos!
No había tenido la posibilidad de agradecerte todos estos aportes luishp. Gran trabajo, la demo es lo que buscaba hacer!. Saludos!