Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all 82207 articles
Browse latest View live

AJAX load problem

$
0
0

Hi, I am learning the example for how to load the 5k rows:

Link to test case: https://datatables.net/extensions/searchbuilder/examples/performance/searchBuilder5k.html

then I want to do the same thing, so I do all the same thing, u can see the picture, as the end of the html I write the ajax part

the ajax link I use my laptop path: C:/projects/Programming_project/django/ceshi/ajax/data.txt

and in the data.txt file, I just copy the the content from the example ( the 5k rows)

I think everything is OK, but when I run the html, it shows "loading..." and never show the table

Anything i did wrong?


How to do dynamic column creation and load data in that column ?

$
0
0

Link to test case:

VIDEO:
https://streamable.com/vo0g9k

Debugger code (debug.datatables.net):

Error messages shown:

Description of problem:

I want dynamic column creation which add a row then fill column cells with respect to associated data, by doing this will take my hassle to click and load data on demand, user will only click to show that column than all that column data is displayed.

How do you only rebuild the searchpane for the column you are editing?

$
0
0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem: I am using the Editor and when I make an edit to a cell, I see that searchpanes gets rebuilt and it takes a very long time. How and where do I specify to rebuild? I know we're asked to do searchPanes.rebuildPane, but it's not clear WHEN you're supposed to run this. So far, I tried it at the Editor 'postEdit' event, but that's not working.

how to load data into my datatable, using ajax, custom filtering.

$
0
0

Hello guys!

I explain a bit, when I am loading my tablet, the data is loaded directly from the PHP server, the method I use to connect to the database is PDO.

but I have all the data, that is, if there is 1000 data, everything is loaded in the first load, this means that there may be a considerable delay or the server hangs etc.

I have a custom filter so what I want is for the first load to show only the first 20 data (the last recorded).

and that through the custom filter for example:

SELECT * FROM TABLE wher search=searchdt;

EXAMPLE AJAX:

<?php
$item = "cod_persona_respr";
$valor= $_SESSION["id"];
$usuarios2 = ModelUsers::ctrShowUsers($item, $valor);

$item = null;
$valor= null;
$Showsdts = ModelTable::ctrShowTable($item, $valor);
 foreach ($Showsdts as $key => $value) {

                                echo '<tr id="filaM'.($key+1).'" class="fila-white">

                                    <td>'.($key+1).'</td>
                                    <td style="color: #305d86;">'.$value["fecha_registro_mp"].'</td>
                                    <td>'.$value["persona_resp"].'</td>
                                    <td>'.$value["lote_p"].'</td>
                                    <td>'.$value["lote_mp"].'</td>
                                    <td>'.$value["viaje"].'</td>
                                    <td>'.$value["fecha_ingres"].'</td>
                                    <td>'.$value["granj"].'</td>
                                    <td>'.$value["galpon"].'</td>
                                    <td>'.$value["sexo"].'</td>
                                    <td>'.$value["line"].'</td>';


                                    if($usuarios2["tipo_user"]=="ADMIN"){

                                        echo
                                            '<td>

                                                <div class="btn-group" role="group" aria-label="Third group">
                                                    <button class="btn btn-warning btnEditItem manito-clic" edititem="'.$value["cod_table"].'" idUsuario="'.$usuarios2["cod_persona_respr"].'" User="'.$usuarios2["user_pr"].'" data-toggle="modal" data-target="#modalEditarTable"><i class="fa fa-pencil"></i></button>
                                                </div>
                                                <div class="btn-group" role="group" aria-label="Third group">
                                                    <button class="btn btn-danger btnDeleteItem manito-clic" deleteitem="'.$value["cod_table_mp"].'" lotep="'.$value["lote_piku"].'" viajep="'.$value["viaje"].'"><i class="fa fa-times"></i></button>
                                                </div>
                                            </td>'
                                        ;

                                    }

                                    echo '</tr>'
                                ;

Necesito convertir un arreglo al formato adecuado y pintarlo sobre la mesa.
cada vez que se aplica el filtro.

So here I need to paint this new data, and in case I clean the custom filter, it returns the data that was initially loaded.

I would appreciate the help, the truth is that this is killing my head.

I speak Spanish, I hope I have made myself understood, thank you.

ajax.reload is not a function

$
0
0
var MBGDATATABLE = $('#MBG_ALS_USERS').DataTable({ ... });

MBGDATATABLE.ajax.reload();

So i had this code and it has been working perfectly fine... Then, I realized that whenever I update the table while on a certain page except page number 1, the table redirects on the page number 1.

To fix this, I revised the reload as per the documentation:

MBGDATATABLE.ajax.reload(null, false);

All of a sudden, it doesn't update anymore and it displays "Uncaught TypeError: MBGDATATABLE.ajax.reload is not a function". I tried to undo the change and returned to the original code. Same error. I didn't change anything except this line on all of my pages that have ajax.reload. Any idea?

Datatables and cookies

$
0
0

I need to find what some cookies with domain datatables.net are used for in my web app.

Where can I get a list? Web app is ASP.NET, HTML, BOOTSTRAP based.

Some of cookies: _utma, _utmb, _utmc, _utmt, _utmz, PHPSESSID ..

tnx

Editor loads strings as numbers and removes leading zeros

$
0
0

Hello,

I have the problem that the editor removes the leading zeros of the article number in a string field when loading the data from the database, so the value can't be written back to the database while editing because the value doesn't exist.

Here is an extract from the database:

s_articles.id | s_articles_supplier.name | s_articles_details.suppliernumber | s_articles_details.ordernumber | s_articles.name                                         | s_articles_details.stockmin | s_articles_details.instock | s_articles_attributes.attr7 | s_articles_attributes.attr6 | s_articles_attributes.lieferant | s_articles_attributes.top_art_lief |
--------------|--------------------------|-----------------------------------|--------------------------------|---------------------------------------------------------|-----------------------------|----------------------------|-----------------------------|-----------------------------|---------------------------------|------------------------------------|
46            | Assa Abloy               | 509X202PZ-----1                   | 0009026                        | AssaAbloy Sicherheitsschloss Motorausführung 509X202PZ | 0                           | -1                         | NULL                        | NULL                        | NULL                            | 0                                  |                           |

And here the data from the JSON:

{"DT_RowId":"row_46","s_articles_supplier":{"name":"Assa Abloy"},"s_articles_details":{"suppliernumber":"509X202PZ-----1","ordernumber":9026,"stockmin":0,"instock":-1},"s_articles":{"name":"AssaAbloy Sicherheitsschloss Motorausf\u00fchrung 509X202PZ"},"s_articles_attributes":{"attr7":null,"attr6":null,"lieferant":null,"top_art_lief":0}}

The controller looks like this:

require "../lib/DataTables.php";

use
    DataTables\Editor,
    DataTables\Editor\Field,
    DataTables\Editor\Format,
    DataTables\Editor\Validate,
    DataTables\Editor\ValidateOptions,
    DataTables\Editor\SearchPaneOptions; 
    
Editor::inst($db, 's_articles')
    ->field(
        Field::inst('s_articles_supplier.name')
            ->searchPaneOptions(SearchPaneOptions::inst()
                ->value('s_articles_supplier.name')
                ->label('s_articles_supplier.name')
                ->leftJoin('s_articles_supplier', 's_articles.supplierID', '=', 's_articles_supplier.id')
        ),
        Field::inst('s_articles_details.suppliernumber'),
        Field::inst('s_articles_details.ordernumber'),
        Field::inst('s_articles.name'),
        Field::inst('s_articles_details.stockmin')
            ->validator(Validate::numeric()),
        Field::inst('s_articles_details.instock')
            ->validator(Validate::numeric()),
        Field::inst('s_articles_attributes.attr7'),
        Field::inst('s_articles_attributes.attr6'),
        Field::inst('s_articles_attributes.lieferant'),
        Field::inst('s_articles_attributes.top_art_lief')
    )

    ->leftJoin('s_articles_details', 's_articles.id', '=', 's_articles_details.articleID')
    ->leftJoin('s_articles_attributes', 's_articles_details.id', '=', 's_articles_attributes.articledetailsID')
    ->leftJoin('s_articles_supplier', 's_articles.supplierID', '=', 's_articles_supplier.id')

    //->where('s_articles_attributes.top_art_lief', 1)
    ->debug(true)
    ->process($_POST)
    ->json();

and here the js

var editor;
var artikelart = 0; //0 = Alle Artikel, 1 = Top Artikel

$(document).ready(function () {
  function colData(column) {
    var data = [];

    column
      .data()
      .unique()
      .sort()
      .each(function (d, j) {
        data.push({
          id: j,
          text: d,
        });
      });

    return data;
  }

  editor = new $.fn.dataTable.Editor({
    ajax: "./pdo/db_inventory.php",
    table: "#inventory",
    fields: [
      {
        label: "Hersteller:",
        name: "s_articles_supplier.name",
      },
      {
        label: "Lieferant:",
        name: "s_articles_attributes.lieferant",
      },
      {
        label: "Hersteller-Nr:",
        name: "s_articles_details.suppliernumber",
      },
      {
        label: "Shop-Nr:",
        name: "s_articles_details.ordernumber",
      },
      {
        label: "Bezeichnung:",
        name: "s_articles.name",
      },
      {
        label: "Min.:",
        name: "s_articles_details.stockmin",
      },
      {
        label: "Lager:",
        name: "s_articles_details.instock",
        attr: {
          type: "number",
        },
      },
      {
        label: "Regal:",
        name: "s_articles_attributes.attr7",
      },
      {
        label: "Bemerkung:",
        name: "s_articles_attributes.attr6",
      },
    ],
  });

  $("#inventory").on("click", "tbody td.editable", function (e) {
    editor.bubble(
      this,
      [
        "s_articles_details.stockmin",
        "s_articles_details.instock",
        "s_articles_attributes.attr7",
        "s_articles_attributes.attr6",
      ],
      {
        title: "Ihre Eingabe:",
      }
    );
  });

  var table = $("#inventory").DataTable({
    ajax: {
      url: "./pdo/db_inventory.php",
      type: "POST",
    },
    autoWidth: false,
    columns: [
      {
        //Hersteller
        data: "s_articles_supplier.name",
      },
      {
        //Lieferant
        data: "s_articles_attributes.lieferant",
      },
      {
        //Hersteller Nr
        data: "s_articles_details.suppliernumber",
      },
      {
        //Shop Nr
        data: "s_articles_details.ordernumber",
      },
      {
        //Bezeichnung
        data: "s_articles.name",
      },
      {
        //Min
        data: "s_articles_details.stockmin",
        className: "editable",
      },
      {
        //Lager
        data: "s_articles_details.instock",
        className: "editable",
      },
      {
        //Regal
        data: "s_articles_attributes.attr7",
        className: "editable",
      },
      {
        //Bemerkung
        data: "s_articles_attributes.attr6",
        className: "editable",
      },
      {
        //Top Artikel hidden
        data: "s_articles_attributes.top_art_lief",
      },
    ],
    columnDefs: [
      {
        type: "string",
        targets: 3,
        render: function (data, type, row) {
          return (
            '<a href="/backend/?c=article&nr=' +
            data +
            '" target="_black"><span class="btn btn-outline-success btn-sm" role="button" style="width:100%;">' +
            data +
            "</span></a>"
          );
        },
      },
      {
        targets: 6,
        render: function (data, type, row) {
          //Lager < Min
          if (data < row.s_articles_details.stockmin) {
            return (
              '<button type="button" class="btn btn-danger"style="width:100%;"> ' +
              data +
              "</button>"
            );
          }
          //Min = Lager
          if (data === row.s_articles_details.stockmin) {
            return (
              '<button type="button" class="btn btn-warning"style="width:100%;"> ' +
              data +
              "</button>"
            );
          }
          //Lager > Min
          else {
            return (
              '<button type="button" class="btn btn-success"style="width:100%;"> ' +
              data +
              "</button>"
            );
          }
        },
      },
      {
        targets: 9,
        visible: false,
      },
    ],
    searchPanes: {
      layout: "columns-1",
    },
    responsive: true,
    dom:
      '<"dtsp-verticalContainer"<"dtsp-verticalPanes"P><"dtsp-dataTable"Bfrtip>>',
    //dom: "PBfrtip",
    serverSide: true,
    processing: false,
    buttons: [
      {
        text: "Alle Artikel",
        action: function (e, dt, node, config) {
          if (artikelart == 0) {
            this.text("Top Artikel");
            dt.column(9).search("1").draw();
            artikelart = 1;
          } else if (artikelart == 1) {
            this.text("Alle Artikel");
            dt.column(9).search("").draw();
            artikelart = 0;
          }
        },
      },
    ],
    select: true,
    language: {
      oAria: {
        sSortAscending: ": aktivieren, um Spalte aufsteigend zu sortieren",
        sSortDescending: ": aktivieren, um Spalte absteigend zu sortieren",
      },
      select: {
        rows: {
          _: "%d Zeilen ausgewählt",
          0: "",
          1: "1 Zeile ausgewählt",
        },
      },
      buttons: {
        print: "Drucken",
        colvis: "Spalten",
        copy: "Kopieren",
        copyTitle: "In Zwischenablage kopieren",
        copyKeys:
          "Taste <i>ctrl</i> oder <i>\u2318</i> + <i>C</i> um Tabelle<br>in Zwischenspeicher zu kopieren.<br><br>Um abzubrechen die Nachricht anklicken oder Escape drücken.",
        copySuccess: {
          _: "%d Zeilen kopiert",
          1: "1 Zeile kopiert",
        },
        pageLength: {
          "-1": "Zeige alle Zeilen",
          _: "Zeige %d Zeilen",
        },
      },
      searchPanes: {
        title: {
          _: "Filter Aktiv - %d",
          0: "Kein Filter ausgewählt",
          1: "Ein Filter ausgewählt",
        },
        clearMessage: "Zurücksetzen",
        loadMessage: "wird geladen",
        count: "{total} gefunden",
        countFiltered: "{shown} ({total})",
        emptyPanes: "keine Daten gefunden",
      },
    },
  });
});

Is this a bug or do I not see the error?

Thanks Lars

Check and Update column empty

$
0
0

Hi guys, I would like to check a column where when it is empty it must display "RITSIC" (without sending "RITSIC" to the database) instead when it is populated by the data taken from the database it must remain unchanged, I tried with rowCallback and with the function render directly in the columns but I couldn't, can you help me?

rowCallback: function ( row, data ) {       
    if ( data.start == ' ') {
            return "RITSIC";

}
},

AND

            {
                "data": "start",
                    render: function ( data, type, row ) {
                            if ( data.start == " ") {
                                    return 'RITSIC';
                            }
                        
                    },
                
            }

Queuing changes in Editor not working when Serverside is true

$
0
0

I ma using the example given in https://datatables.net/blog/2017-10-24#Multi-row-editing.
Everything works as expected when "serverSide": false and doesn't work when "serverSide": true

My code looks like this:

var editorOpts = {
    "table": "#mssr_list",
    "fields": [ {
        "label": "Product Code:",
        "name": "product_code_fk"
      } ,

      {
        "label": "Name:",
        "name": "m_1"
      } 
 ]
  } ;

   var changedRows = [];
  var localEditor = new $.fn.dataTable.Editor( editorOpts );

localEditor.on('postEdit', function (e, json, data) {
    changedRows.push( '#'+data.DT_RowId );

    tableone.buttons([3,4]).enable();
    console.log(changedRows);

});

    var ajaxEditor = new $.fn.dataTable.Editor( $.extend( true, {
         ajax: '../../controllers/xxx_fetch.php'
    }, editorOpts ) );


    var tableone = $('#mssr_list').DataTable( {

        "processing": true,
        "serverSide": true,
         "scrollY":"800px",
          "scrollX":"100%",
          "scrollCollapse": true,
          "ordering": [],
          "stateSave": false,
           "info":   true,
        "dom": 'lBrtip',
        "ajax":"../../controllers/xxx_fetch.php",

        "columns": [

      { data: "product_code_fk" },
      { data: "m_1"}

        ],

     select: true,
    buttons: [
            { extend: "create", editor: ajaxEditor },
            { extend: "edit", editor: localEditor },
            { extend: "remove", editor: ajaxEditor },
            {
                text: 'Save changes',
                init: function () {
                    this.disable();
                },
                action: function () {
                    ajaxEditor
                        .edit( changedRows, false )
                        .submit();

                    changedRows.length = 0;
                    tableone.buttons([3,4]).disable();
                }
            },
            {
                text: 'Discard changes',
                init: function () {
                    this.disable();
                },
                action: function () {
                    this.ajax.reload();

                    changedRows.length = 0;
                    tableone.buttons([3,4]).disable();
                }
            }
        ]

});

add delete button in ajax query

$
0
0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

I want to export the selected rows data when datatable is server side processing

$
0
0

How can I export the selected rows, please help.

Thanks in advance

Fixed columns are not getting updated when updating the datatable.

$
0
0

I have created a datatable using angularjs and applied fixed columns on the same.

0">
Misc Status Task/Group Name Assigned User Responsible Party Actual Start Date % Complete
0 && x.ParentId != 0"> image 0 && x.ParentId != 0"> image {{status.StatusName}}
image image {{x.TaskName}}
   {{x.TaskName}}
<%--<option ng-repeat="contact in Contacts" value="{{contact.ContactID}}" ng-selected="contact.ContactID == x.Assigned">{{contact.ContactName}}--%> {{x.Party_Resp}}

and in my controller I have defined my dtOptions like below:

//define options and columns for PI Flow grid
$scope.dtOptions = DTOptionsBuilder.newOptions()
.withOption('order', [])
.withOption('paging', false)
.withOption('searching', false)
.withOption('scrollY', '450px')
.withOption('scrollX', true)
.withOption('scrollCollapse', true)
.withOption('lengthChange', false)
.withOption('autoWidth', false)
.withOption('deferRender', true)
.withFixedColumns({
leftColumns: 3,
heightMatch: 'auto'
});

$scope.GetPITasks = function () {
var url = "PIService.svc/GETTASKDETAILS?PROJECTID=" + $scope.ProjectId + "&random=" + Math.random(); //PIFLOW.json

        $http.get(url).success(function (response, status) {
            $scope.PITasks = response;
        }).error(function (response, status) {
            $scope.StatusMsg = "Error in fetching PI flow details.";
        });
    }

When I add a note for a selected row, my original datatable gets updated immediately without refreshing the datatable but, the cloned datatable for which the fixed columns are applied doesn't get updated. Is there any way to reload the datatable without refreshing the entire table? I used $scope.dtInstance.reloadData(null, false) but it doesn't help out.

Please do the needful and give your suggestions.

Upgrade PHP 7.2 to 7.4

$
0
0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

Hi

I have just upgraded my PHP from 7.2 to 7.4 using PHP Selector on my cPanel wrongly expecting it to maintain the extensions checked when using 7.2. I should have created a screenshot of all the extensions, so I am experiencing unusual behaviour on some of my datatables.

Before detailing the issues which are likely to be as a result of not including necessary PHP extensions, I have attached my current PHP set-up on the server. Can someone advise me if I am missing any obvious essential extensions.

Note reverting back to 7.2 still results in issues, so I must be missing some extensions is my guess.

Any help is much appreciated.

Many Thanks

Colin

Escaped characters and the select filter

$
0
0

My test case shows filtering works with escaped characters, but the select value (current selection) doesn’t show because it defaults to the blank top value. Normal alphanumeric characters are fine and show as expected.

For example, the select filter under “Office” shows variations on New York with 3 containing a (.) (,) and (/). After selecting one of these the filter defaults to blank and the selected option is the only one in the drop down but but not appearing as the selected.

I’ve had some mixed success by replacing…
var val = $.fn.dataTable.util.escapeRegex($(this).val()); with var val = $(this).val(); but then certain characters didn’t show.

Is there a way around this or do I need to avoid anything other than alphanumeric characters if I’m going to apply a select filter to column?

http://live.datatables.net/rifonira/1/edit

Initialize table based on if condition with different column and rows.

$
0
0

Description of problem:
Scenario 1:
I am loading datatable on page load event, where consider the column name

column 1: Employee,
column 2: JobDescription(custom dropdown column),
column 3: Job Location(Custom dropdown column),
column 4: Shift(Custom dropdown column)

Scenario 2:
Now when I click on search criteria in which if selected date is less than current date than I have to
display table like below

column 1: Employee
column 2: JobDescription (label)
column 3 : Attendance(custom dropdown column)
column 4 : Hours (custom textbox column)

In above both scenario I am able to get the all the custom components. The only issue is, I am not able to redraw the table
for scenario 2 when click for searching criteria. Is there any way that I can create table again and fill table with new values
and custom components which are already created by me. but just have to fit in datatable.


How can I pass my data to the json format using the foreach ()?

$
0
0

How can I pass my data to the json format using the foreach () loop to load it into the ajax option of the datatables?
and retrieve them with the data table data filter option:

something like that:

I just want to show the data from the db using server side,
but I have not managed to make it work for me, I would appreciate the help, some example.

as you can see I am using classes and methods to do the queries (MVC).

js datatables:

    $('#myTable').DataTable( {
        'processing': true,
        'serverSide': true,
        'ajax': {
            'url':'ajax/dtb.mostrar.dts.ajax.php',
            dataFilter: function(data){
               var json = jQuery.parseJSON( data );
                json.recordsTotal = json.total;
                json.recordsFiltered = json.total;
                json.data = json.list;

                console.log("datos devueltos de la bd: ",data);

                return JSON.stringify( json ); // return JSON string


            }
        }
    } );.

archivo ajax php; ajax/dtb.mostrar.dts.ajax.php

        <?php

         require_once "../modelos/showtables.modelo.php";
            require_once "../controladores/showtables.controlador.php";





                                   $item = null;
                                    $valor= null;

                                    $showTable = ControladorTables::ctrMostrarTables($item, $valor);
                                    $fila=-1;
                                    foreach ($showTable as $key => $value) {

                                        $arreglo["data"][]=$value["cod_materia_prima_mp"];
                    $arreglo["data"][]=$value["fecha_registro_mp"];
                    $arreglo["data"][]=$value["fk_persona_responsable_mp"];
                    $arreglo["data"][]=$value["lote_piku_mp"];
                    $arreglo["data"][]=$value["lote_materia_prima_mp"];
                    $arreglo["data"][]=$value["viaje_mp"];
                    $arreglo["data"][]=$value["fecha_ingreso_mp"];
                    $arreglo["data"][]=$value["granja_mp"];
                    $arreglo["data"][]=$value["galpon_mp"];
                    $arreglo["data"][]=$value["sexo_mp"];
                    $arreglo["data"][]=$value["linea_mp"];
                    $arreglo["data"][]=$value["edad_mp"];
                    $arreglo["data"][]=$value["cantidad_jaula_mp"];
                    $arreglo["data"][]=$value["cantidad_aves_por_jaula_mp"];
                    $arreglo["data"][]=$value["cantidad_aves_mp"];
                    $arreglo["data"][]=$value["peso_promedio_mp"];
                    $arreglo["data"][]=$value["placa_vehiculo_mp"];
                    $arreglo["data"][]=$value["conductor_vehiculo_mp"];
                    $arreglo["data"][]=$value["hora_incio_atrape_mp"];
                    $arreglo["data"][]=$value["hora_salida_granja_mp"];
                    $arreglo["data"][]=$value["hora_llegada_planta_mp"];
                    $arreglo["data"][]=$value["total_atrape_mp"];
                    $arreglo["data"][]=$value["observaciones_mp"];
                    $arreglo["data"][]=$value["numero_sello_seguridad_mp"];
                    $arreglo["data"][]=$value["mortalidad_porcentaje_mp"];
                    $arreglo["data"][]=$value["tipo_sacrificio_mp"];
                    $arreglo["data"][]=$value["estado_aves_apto_mp"];
                    $arreglo["data"][]=$value["veterinario_granja_mp"];
                    $arreglo["data"][]=$value["recibe_planta_mp"];
                    $arreglo["data"][]=$value["fecha_inspeccion_granja_mp"];
                    $arreglo["data"][]= '<td>

                                                        <div class="btn-group" role="group" aria-label="Third group">
                                                            <button class="btn btn-warning btnEditarMateriaP btnEditMateriaP  manito-clic" editMp="'.$value["cod_materia_prima_mp"].'" idUsuario="'.$usuarios2["cod_persona_responsable_pr"].'" User="'.$usuarios2["usuario_pr"].'" data-toggle="modal" data-target="#modalEditarMateriaPrima"><i class="fa fa-pencil"></i></button>
                                                        </div>
                                                        <div class="btn-group" role="group" aria-label="Third group">
                                                            <button class="btn btn-danger btnEliminarMateriaP manito-clic" deleteMp="'.$value["cod_materia_prima_mp"].'" lotepiku="'.$value["lote_piku_mp"].'" viajepiku="'.$value["viaje_mp"].'"><i class="fa fa-times"></i></button>
                                                        </div>
                                                    </td>';

                                            }



                                    }

        echo json_encode( $arreglo);


        ?>

Excel Export with Image

$
0
0

Has anyone been able to verify a method of exporting an Excel file that includes an image? I have seen an example, though I have not be able to duplicate the said results.

Here is the error message: Uncaught TypeError: Failed to execute 'serializeToString' on 'XMLSerializer': parameter 1 is not of type 'Node'.

select control initialisation

$
0
0

@allan
hi all
I'd like to know what is the DataTables\Editor\Options_manualAdd Array [0]
Is it a way to add datas in select options list ?

Thanks

Is there an option to set a button in date picker to clear the date (setnull) ?

$
0
0

In date picker there is no option (I think) that allow to reset (null or else) current date time field.
If allowing keyboard action it can be do, but ...

Do you think it will be possible to get an option like this ?

Datatable is not auto hidding columns when screen size is smaller

$
0
0

Hi guys,

When I insert this datatable in this file is not hidding columns when I resize down screen and I don't know why...
File with issues is visedi.php
I have a lot of another files working (more simple files), and it works. Example attached pac.php file.

Thanks a lof if you could take a look and give me some ideas.

This is the code:

<div class="table-responsive m-t-10">
                                                                <table id="taula_medichabitual" class="taula_datatable_sub table display nowrap table-hover table-striped table-bordered font-light" cellspacing="0" width="100%">
                                                                    <thead>
                                                                        <tr>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_699']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_451']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_448']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_700']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_436']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_701']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_378']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_379']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_6']; ?></th>
                                                                        </tr>
                                                                    </thead>
                                                                    <tbody>
                                                                    <?php
                                                                        $sql_docs = "SELECT * FROM V_Medicacio_Habitual WHERE Id_Pacient = " . $row_vis["Id_Pacient"] . " ORDER BY Data_Fi ASC";
                                                                        $stmt_docs = $con->prepare($sql_docs);
                                                                        $stmt_docs->execute();
                                                                        while ($row_docs = $stmt_docs->fetch())
                                                                        {
                                                                            if ($row_docs['Medicament'] <>"0")
                                                                            {
                                                                                $Medicament = substr($row_docs['NomMedicament'],0,60);
                                                                            }
                                                                            else
                                                                            {
                                                                                $Medicament = $row_docs['Medicament2'];
                                                                            }

                                                                            if ($row_docs['Data_Fi']=="0000-00-00")
                                                                            {
                                                                                $Data_Fi = "";
                                                                            }
                                                                            else
                                                                            {
                                                                                $Data_Fi = date('d/m/y', strtotime($row_docs['Data_Fi']));
                                                                            }
                                                                            ?>
                                                                            <tr>
                                                                                <td class="align-middle text-center"><?php echo $Medicament; ?></td>
                                                                                <td class="align-middle text-center"><?php echo $row_docs[$_SESSION['Idioma_Camp']."Via"]; ?></td>
                                                                                <td class="align-middle text-center"><?php echo $row_docs['Dosi']; ?></td>
                                                                                <td class="align-middle text-center"><?php echo $row_docs['Durada']; ?></td>
                                                                                <td class="align-middle text-center"><?php echo $row_docs['Unitats']; ?></td>
                                                                                <td class="align-middle text-center"><?php echo $row_docs['Pauta']; ?></td>
                                                                                <td class="align-middle text-center"><?php echo date('d/m/y', strtotime($row_docs['Data_Inici'])); ?></td>
                                                                                <td class="align-middle text-center"><?php echo $Data_Fi ?></td>
                                                                                <td class="align-middle text-center"><?php echo $row_docs['Nom_Usuari']; ?></td>
                                                                            </tr>
                                                                    <?php } ?>
                                                                    </tbody>
                                                                </table>
                                                            </div>
                                                        </div>
Viewing all 82207 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>