Questions tagged as 'javascript'

1
answer

How to print a JSON string within an input with PHP?

I need to print a string JSON from PHP within value of a input , to then be able to recover it with JavaScript . <?php $array = array( "foo" => "bar", ); $json = json_encode($array); ?...
asked by 24.08.2017 / 21:34
2
answers

What is the difference between "new Array () / new Object ()" and "[] / {}" respectively?

In javascript there are two ways to create arrays and objects , they can be created using literal objects: new Array() - Object - arrangement new Object() - Object - object or they can be created from their primitive...
asked by 10.05.2017 / 17:04
1
answer

How to transpile files ES6 to ES5 with Babel?

I'm trying to follow a series of examples to learn ES6, but I can not get it to transpile correctly. In my case I use the following line to do it babel --watch index.js --out-file index_ES5.js My file .eslintrc has the following c...
asked by 26.08.2017 / 20:48
1
answer

Socket.io google maps

I am building a small system, to see the location of a user in real time with google maps. I have a backend echo in node.js (socket.io). A frontend where I see a google map and the scoreboard in real time. and an app which sends the data to t...
asked by 17.05.2017 / 16:04
2
answers

Export images from html to word

Starting with my previous question , I would like to know how I can export an image of html to Word, or at least know if it is possible or not. I have the following table: <table id="test" class="table table-striped table-custom table-...
asked by 26.04.2017 / 15:05
1
answer

How to use the hotkeys with Jquery?

I would like to know how to use the quick access keys in Jquery. Currently for click events a button is used in this way: $("#id_boton").on('click', function (e) { //codigo ... }); In the case of the row of a datatable: $('#idtable...
asked by 28.03.2017 / 04:57
1
answer

Select date and load the value automatically

What, what I try to imply is that I need the user to select a date and without clicking on the me button of the selected date, I have searched for events in JS but I am a bit lost, someone could advise me by please, thank you very much .. I s...
asked by 27.03.2017 / 21:28
1
answer

Cmbiar og: image with Javascript

I have a page where, for reasons beyond my control, I do not have access to the HEAD (business issues). The thing is that I currently have the load of og:image done by a JQuery call: $('head').append('<meta property="og:image" con...
asked by 02.03.2017 / 09:58
1
answer

Postback in ASP net MVC 5 does not work after a JsonResult

Do a postback in jsonresult since I use a modal to delete in mvc 5 but it does not perform a postback .. [HttpGet] public JsonResult Eliminar(int id) { cargo carg = db.cargo.Where(x => x.idcargo == id).FirstOrDefault();...
asked by 29.03.2017 / 18:17
2
answers

Ajax query "undefined"

My query is as follows, my code is: $("#sPedido").change(function(){ var codigo_c=$("#sPedido").val(); $.post("traertabla.php", function(datos){ $("#midiv").html(datos); alert(datos.mensaje); }); }); The line:...
asked by 09.03.2017 / 01:06