Questions tagged as 'javascript'

1
answer

Submit a post with reload of just one div

I have a form that I want to pass via POST, but without reloading the entire page, after submitting the information, I wanted a div to reload its content, I have the following code: <script> $(function() { $("...
asked by 30.11.2017 / 19:05
1
answer

How to swap the SVG drawing for a PNG image after completing the animation?

Good afternoon! I put an SVG drawing on my site, and I put an animation for when the drawing is visible on the screen, start drawing animation by "completing", follow the JS code. document.addEventListener('DOMContentLoaded', function() {...
asked by 03.12.2017 / 18:00
2
answers

Need to declare variables in a Javascript function

Hello. I'm starting to learn programming logic. When I create a function in Javascript, I declare and request to return its value. function exemplo(teste){ var saida = teste + 4; return saida; } Well, w...
asked by 03.12.2017 / 03:22
1
answer

Get HTML with jQuery by pressing button

I have a simple system that takes the HTML of a file and places it in a single dynamic index . Example: <a onclick="carregar('cartaonatal/natal.html');" href="#">Agradecimento</a> //chama a função function carregar(pagina){...
asked by 04.12.2017 / 02:33
2
answers

How do I send a form by e-mail and change the DIV to another one with a message?

Oie I did following: HTML <div id="minhaDiv"> <form id="formulario"> <input type="text" name="nome" id="nome" autocomplete="off" placeholder="Digite seu Nome"> <input type="text" name="email" id...
asked by 02.03.2018 / 12:33
3
answers

Percentage mask

How can I make a percentage mask, where the user types a number in percent in an input-text, the number can be at most 100%, hence if for example the user types 30% in the first input, he can no longer enter more than 70% in the second input, th...
asked by 03.03.2018 / 00:28
3
answers

save external site IMG

Is it possible to save an image to a /imagens folder of an external site? I can save normal image if I right click and put "Save image as" , however I'd like to know how to do this in JavaScript or < in> PHP , I've inspected and the elemen...
asked by 02.03.2018 / 12:15
1
answer

Function with if JavaScript

Good afternoon, I have a function in javascript, and it does not enter the IF, the txtTipodePlano field is filled in as "MONTHLY", it should come in, just that it falls on the else, if (document.getElementById("<%=ckPosPago.ClientID%>...
asked by 06.11.2017 / 19:10
1
answer

Escape symbols in NodeJS

I have the following code running on NodeJS /*jshint esversion: 6 */ const express = require('express'); const bodyParser = require('body-parser'); const app = express(); const port = 8080; app.use(bodyParser.urlencoded({extended: fal...
asked by 02.03.2018 / 16:18
2
answers

How to check if an object has a string?

I have the following problem, I need to check if an object has a certain string, this object comes from the google places API autocomplete. This is a return json, for example: { "address_components": [{ "long_name": "1219", "short_n...
asked by 06.11.2017 / 14:50