Questions tagged as 'javascript'

1
answer

How to insert a breakpoint in Javascript by code

I know that it is possible to mark a line as a breakpoint using Dev Tools, but is it possible to invoke the browser debugger directly from the code?     
asked by 23.03.2017 / 21:48
2
answers

Uncaught SyntaxError: Unexpected token {[closed]

I was developing this code and the following error was generated:    Uncaught SyntaxError: Unexpected token { $(document).ready(function() { editor = new $.fn.dataTable.Editor( { ajax: "../php/staff.php", tab...
asked by 14.08.2017 / 22:49
3
answers

Concatenate Javascript with PHP

I'm trying to concatenate PHP with Javascript, but I'm not getting it. <button onclick="gravaDados('/" . <?php echo nomeCliente; ?> . /"')" class="btn-playpause">Play</button> Thank you     
asked by 11.08.2017 / 23:45
1
answer

Convert data with JavaScript?

How do I convert the date in this type 02 Ago 2017 to 02/08/2017 ? I'm using vuejs-datepicker and when selecting it comes in that format, and in the documentation says to do so ... customFormatter(date) { return mo...
asked by 04.08.2017 / 16:34
1
answer

Error Call to undefined function split ()

if(isset($_POST['lista']) && $_POST['delimitador']) { separar(trim($_POST['lista']), $_POST['delimitador']); } function separar($lista, $delimitador){ $ab = split("\n", $lista); //está é a linha 31 aonde o erro e apresentad...
asked by 07.08.2017 / 22:48
4
answers

How to format result with comma and period?

How do I format the result of a comma and dot sum. The Result: 80.50 * 52 = 4189.00 How do I intend: 80.50 * 52 = 4,189.00 My JS function calcular() { var valores1 = document.getElementsByClassName('txt1'); var valores2 = docu...
asked by 26.07.2017 / 17:57
2
answers

Complete next field without user having to give TAB

By clicking on the button next to UF the user opens a table with the states of Brazil, and from the state selection the other fields are completed, so far so good I could do, however I have to click inside the input and then somewhere else or gi...
asked by 17.10.2017 / 20:59
1
answer

Alerting only text of a specific element

I have this code: <div id="div"> This is some text.<br/> <button>Button</button> </div> <script> alert(document.getElementById("div").innerText); </script> And when I ask to ale...
asked by 16.09.2017 / 19:28
2
answers

Reset value of a Select based on an option

How can I do to zero a value of a select based on the option of another select, for example I have these two check boxes, when the option "The view" is checked I would like to zero the value of plots in the other select, possible to do this? I w...
asked by 02.10.2017 / 13:27
3
answers

Capture content to be pasted

I need to capture the contents of a text that will be pasted into an input before the glue happens. I've already captured the collage event: $(input).on("paste", function (evt) { /* evt contém tudo sobre o evento menos o conteúdo */ });...
asked by 25.09.2014 / 23:39