Questions tagged as 'javascript'

3
answers

Innerhtml does not work

I'm trying to make a very simple javascript example but innerhtml is not being recognized. <!DOCTYPE html> <html> <head> <title>Pagina com Javascript</title> <script src="me...
asked by 13.10.2016 / 15:37
3
answers

Build circular menu in css [closed]

Anyone know how to give me some tips on how to build a simple menu, such as gif: link Or similar. For a web page, I've tried it in some ways, but it lacks knowledge.     
asked by 23.06.2017 / 08:16
3
answers

Pivot table with row and column addition

Is it possible to create a table with the addition of rows and columns? According to the image, the situation is: - Start a table with 3 columns and a row; - Considering that the first line and the first column would have to be editable (being p...
asked by 14.06.2017 / 22:38
2
answers

Change iframe height with external src depending on content height

I have an iframe where src points to an external domain After the content is loaded, a portion is hidden because the iframe does not fit the content. Since the iframe has an external src, I can not manipulate its content in order to get th...
asked by 13.01.2015 / 21:17
1
answer

I use setInterval X WebSockets

I'm developing a PHP application with AngularJS, in this application has a messaging system. I need only check the message quantity at least every 2 min. My doubts would be, would using the setInterval be recommended in this case, or would creat...
asked by 08.12.2014 / 16:56
3
answers

How to insert row at the top of a table using JS?

I use the following code to insert a row into a table: var linha = "<tr>"; linha += '<td class="cnes">' + cnes + '</td>'; linha += '<td class="cbo">' + cbo + '</td>'; linha += '<td class="profissional">' + p...
asked by 17.07.2017 / 20:09
3
answers

How can I decrease the size of this function?

It's a simple function, but it's starting to turn a monster, the only thing that changes is the number at the end of each word. Does anyone have any tips on how to shorten this code? Without minify Note: I do not want to decrease the size in KB,...
asked by 26.09.2017 / 19:00
4
answers

Error defining getElementById?

I have an element where the id attribute is an integer. I'm trying to define, but I can not. I'm doing this: var 1 = document.getElementById(1).value Is this correct?     
asked by 18.11.2016 / 15:29
3
answers

Two conditions in the same loop if () javascript

I can not prevent the submit button from performing your action if the information you entered is not the same, could someone help me? HTML <form method="post" action="php/cadastro.php"> <span class="form_title">Cad...
asked by 02.08.2016 / 19:50
3
answers

Check if the number is prime in JavaScript [duplicate]

Well, I made this code to show if the textbox number is prime, if a message appears in the paragraph with message id. But it does not work if someone could tell me where I'm going wrong. I would be grateful. <html> <head>...
asked by 13.04.2017 / 23:49