Questions tagged as 'javascript'

1
answer

Add and remove fields dynamically with sum and multiplication of values

I have a page, where the user should put the quantity and value of each item. He can add as many items as he wants. Below the page, it will show the total result of the sum of all possible rows that the user adds. See the Fiddle below for a b...
asked by 24.06.2016 / 22:36
1
answer

How to capture text from nested divs in an elegant way?

This post explains how to copy plain text to the clipboard using the ZeroClipboard . But a reader came up with a question: how do you get the content of a <div> with multiple child divs within it? When we use the above example...
asked by 29.06.2016 / 22:26
1
answer

What is the compatibility with browsers when using the template tag?

Reference: link Example usage: Javascript: window.onload = function() { var contentHTML = document.getElementById("teste").content; var linha = document.importNode(contentHTML, true); document.getElementById("tabela").appendChil...
asked by 30.06.2016 / 17:41
3
answers

SyntaxError: unterminated string literal JAVASCRIPT

I'm having trouble with this line of javascript , I'm dynamically getting data from PHP . fnc_eglise_ajaxGet('ajax/deletaPessoaVinculo.php?d=<?php echo eglise_dataDeDMAParaAMD($vinculo->DAT_INICI_VINCU); ?>&p=PV&a=...
asked by 25.01.2016 / 18:39
1
answer

Problems with array.sort ()

I'm trying to sort an array but I'm having trouble, it's just returning 0. I'm doing the following: Here I draw my array: arrayVelho.sort(compare); After calling the compare function that compares the array data: function compare(a,b)...
asked by 27.01.2016 / 13:29
1
answer

Doubt in AngularJS! (Factory, Controller, View) Why is 'identity' not updated in VIEW?

I have a question in AngularJS! The source code is at link In the factory I have a property named identity , which is mirrored to the controller and displayed in the view. When adding a new message this property is incremented corr...
asked by 25.01.2016 / 21:05
2
answers

the onKeyUp event of the java script influences the function of the CustomValidator

I have a question, the onKeyUp event of the java script influences the ClientValidationFunction property of the CustomValidator.   I'm maintaining a page here in the company, and I need to validate a textbox field to accept only number or empty...
asked by 14.12.2015 / 17:39
1
answer

Event toggle_sidebar

How do I know if toggle_sidebar is enabled or not? I use this command to enable and disable: uib_sb.toggle_sidebar($(".uib_w_43"));     
asked by 14.12.2015 / 16:23
1
answer

Add Players in script code

I have the following code: var buttons = $('#videoGallery .vid'); var liHeight = $('#videoGallery li').height(); buttons.click(function(){ var videoID = $(this).attr('data-videoID'); var videos = $('<div id="meuVideo"> <iframe width=...
asked by 16.12.2015 / 16:15
3
answers

Stop running a JavaScript function to perform another function

I'm developing a system using angular and have the following function: function drawLatLong(i, arrayIdColetor) { ..... (não exibi o código por ser grande e achar desnecessário que vcs o analisem) ..... }); This function...
asked by 14.12.2015 / 18:02