Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready( function ()
- {
- $('#planner').DataTable({
- "paging": true,
- "lengthChange": true,
- "searching": true,
- "ordering": true,
- "info": false,
- "responsive": true,
- "autoWidth": false,
- "pageLength": 10,
- "ajax": {
- "url": "data.php",
- "type": "POST"
- },
- "columns": [
- { "data": "urutan" },
- { "data": "partnum" },
- { "data": "partdesc" },
- { "data": "est" },
- { "data": "planout" },
- { "data": "status" },
- { "data": "output" },
- ]
- });
- });
- $(document).ready( function ()
- {
- $('#report').DataTable({
- "paging": true,
- "lengthChange": true,
- "searching": true,
- "ordering": true,
- "info": false,
- "responsive": true,
- "autoWidth": false,
- "pageLength": 10,
- "ajax": {
- "url": "datareport.php",
- "type": "POST"
- },
- "columns": [
- { "data": "urutan" },
- { "data": "partnum" },
- { "data": "partdesc" },
- { "data": "est" },
- { "data": "planout" },
- { "data": "status" },
- { "data": "output" },
- { "data": "button" },
- ]
- });
- });
- $(document).ready(function() {
- $("#plan_file").on("submit", function () {
- $("#response").attr("class", "");
- $("#response").html("");
- var fileType = ".csv";
- var regex = new RegExp("([a-zA-Z0-9\s_\\.\-:])+(" + fileType + ")$");
- if (!regex.test($("#file").val().toLowerCase())) {
- $("#response").addClass("error");
- $("#response").addClass("display-block");
- $("#response").html("Invalid File. Upload : <b>" + fileType + "</b> Files.");
- return false;
- }
- return true;
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement