Questions tagged as 'javascript'

1
answer

I need to have the form fill in the info from the search by cnpj

Below is a snippet of code. I have doubts on how to do so, when clicking SEARCH, the CNPJ can be found on the receivers site and the fields below are filled in: link using the $ .ajax function of the jQuery library. (Where "00000000000000"...
asked by 02.09.2017 / 20:04
2
answers

How to get 2 decimal places [duplicate]

How do I show only 2 decimal places after the comma. I have the following script: <script> function DescontoPorcentagem() { var bruto = $("#tot_bruto").val(); var porcentagem = $("#Tot_desc_prc").val();...
asked by 02.09.2017 / 16:05
2
answers

Convert Number in Reais

I want to develop an example simulator: from 1 to 99 real multiplies it by x10 and strong> real it multiplies by x11 . I wanted to know how to convert the number of campo1 to real when typing? Code: <html> <...
asked by 02.09.2017 / 16:57
1
answer

Can not set headers after they are sent - NodeJS

I am creating a user registration system in NodeJS and I need to check if the email I entered is already registered, everything is working normally, if I type an existing email it returns me the id of the user who uses this email. However, at th...
asked by 02.09.2017 / 20:34
2
answers

Removing .append () jQuery

I have several buttons where in the click of the same directs to an Ajax request passing as parameter the id of a product and through an external file, as the same is added to the cart however this is not so relevant. Another thing not so import...
asked by 31.08.2017 / 21:26
2
answers

Open window 1 only

I want to click on the page a window opens and I am using this code <script> document.onclick = function( e ){ myFunction(); } function myFunction() { window.open("http://google.com.br", "_blank", "toolbar=yes, scrollbars=yes, resizab...
asked by 02.09.2017 / 16:19
2
answers

Uncaught TypeError: Can not read property 'split' of undefined at XMLHttpRequest.alertContents

var prof1 = 0, prof2 = 0,prof3 = 0, prof4 = 0,prof5 = 0, prof6 = 0,prof7 = 0, prof8 = 0,prof9 = 0, prof10 = 0,prof11 = 0, mat1 = 0,mat2 = 0, mat3 = 0, mat4 = 0,mat5 = 0, mat6 = 0, mat7 = 0,mat8 = 0, mat9 = 0, mat10 = 0,mat11 = 0; v...
asked by 02.09.2017 / 00:06
2
answers

Generate a JSON from a converted XML with Javascript [duplicate]

I was able to do a conversion from an xml to json using a solution that I found on the internet and it answered perfectly, it stores all the json in a string and shows on the screen, but I do not know how to play the contents of this string in...
asked by 01.09.2017 / 20:16
2
answers

Limit characters does not work after using Ctrl + V

The idea is not to enter more than 10 characters. Crtl + V is failing. Example: Type 9 characters And then use Crtl + V (failure), this is allowing you to enter more than 10 characters. Follow JS code: $(document).ready(functio...
asked by 21.09.2017 / 23:18
1
answer

Search for id Mongo

Hello everyone, I'm following the Getting Mean book but I came across a problem I can not solve. I have a document that I show below collecting data from Mongo, and in it I have subdocuments in the case reviews where I want to get the id....
asked by 22.09.2017 / 14:49