Questions tagged as 'javascript'

1
answer

Problem in declaration of variable 'name' javascript

Can anyone explain to me what is the problem with the word 'name' in JavaScript? see this code: The result of the first code will say that the variable name is an object and that name is a string, and the difference (apparently) of the variab...
asked by 12.07.2018 / 05:07
2
answers

How to generate value by clicking an input type submit

Form to send the selected data for deletion. <form action="index.php?pagina=../controller/controllerUser&acao=ok" method="POST" enctype="multipart/form-data"> <label>Nome:</label>...
asked by 21.05.2015 / 00:26
2
answers

Add a line before another line that has an ID

I need to add a line at a specific position in a table, using Javascript . Example: <table> <tr><td>Teste</td></tr> <!-- Inserir linha aqui! --> <tr id="id_2"> <td>Teste 2</td>...
asked by 20.05.2015 / 22:18
1
answer

Detect smartphone back button

Is there any way to detect when the physical back button of the smartphone is clicked? I need this to close a modal . I thought there might be a matching number like on the keyboard and use event.which to detect but could not fin...
asked by 09.10.2018 / 21:40
1
answer

Move the div to the degrees value in Javascript

Simply move the div toward the degress value. I did several ways, but I can not. A code I'm trying to: link "Does anyone have any light / solution to this problem?!" Signage / Example below: Thank you!     
asked by 18.06.2015 / 03:47
1
answer

How to make the box open without having to load the text

I have a problem and I can not remove the click to open the text box, I want to leave the text box always open and mandatory, how do I do this? I think the code is this: html += '<div class="qstxt"> <span onclick="$(...
asked by 28.06.2015 / 18:19
1
answer

How to apply opacity on a DOM element - createImage (); - through a javascript editor?

I'm using p5.js - a javascript library - to capture images from a news API. I would like these images to be superimposed, but opaque, so that the images blend. I'm not able to apply direct opacity to the javascript code. I can change the posi...
asked by 22.06.2018 / 13:36
1
answer

Multiple component calls in list

I have a basic user list with 4 columns ( NAME | EMAIL | PHONE | OPTIONS ). In the options column, for each table record I have an edit and remove button. I would like each edit button to trigger another component (edit-user-modal-component...
asked by 21.06.2018 / 16:30
1
answer

How to clone a javascript object? By copy and not by reference? [duplicate]

I need to copy a javascript object to be able to manipulate the copy freely. But when I try to copy the object normally through the = sign, the "copy" is done by reference. That is, I actually want the object to be "cloned." See JsF...
asked by 19.09.2014 / 22:02
1
answer

Alternative php include for handlebars.js in the construction of templates

I'm making a new website, I'm with the template ready and I want to implement handlebars.js, To control the template I have always used: <php include "header.php"; ?> <php include "footer.php"; ?> and so on. I want to impr...
asked by 22.09.2014 / 04:06