and print the values of a query in standalone mode
and print the values of a query in standalone mode
rrzavaleta
Posts: 78Questions: 52Answers: 2
and print the value of a query on labels
<dt data-editor-label="TXT_ETIQUETA"></dt>
<dd data-editor-field="TXT_ETIQUETA"></dd>
commonly do something like this, to pass the value to the html tags.
url: 'include/implentacion_persona2.php?var1='+id_campo,
type: "POST",
data: query,
dataType: 'json',
success: function (data) {
var obj = data;
for (var i = 0, o = obj.data, l = o.length; i < l; i++)
{
alert( 'IDASEGURADORA = ' + o[i].ID_ASEGURADORA + ' IDCAMPO = ' + o[i].ID_CAMPO + ' ETIQUETA = ' + o[i].TXT_ETIQUETA );
$("#id").val(o[i].ID_ASEGURADORA);
$("#nombre").val(o[i].ID_CAMPO);
$("#id2").val(o[i].TXT_ETIQUETA);
I have not been able to realize send data in this way, I can help you achieve this.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Is the Javascript above part of your Editor
ajaxoption? You can't usesuccessas noted in theajaxdocumentation as Editor will override it.I'm afraid I don't fully understand what you are asking. Do you want to write values to the HTML? It looks like you already are on lines 10-12.
Allan
I want to do is pass the values of a variable tag
<dt id ="id"data-editor-label="TXT_ETIQUETA"></dt>
I commonly do this
$("#id").val(o[i].ID_ASEGURADORA);
but I can not pass the value .
Use
$().html()rather than$().val()if you want to write to the HTML.Allan