Questions tagged as 'javascript'

2
answers

Doubt with Jquery Load

I have a menu that I will use on all pages, so I want to load the content: I'm doing this: <head> <meta charset="utf-8"> <!-- This file has been downloaded from Bootsnipp.com. Enjoy! --> <title> </titl...
asked by 21.09.2017 / 20:18
1
answer

jQuery - function .prop ()

I have a input that is disabled by default, however I wanted to enable it in loading the page through jQuery, but it is not working. Code of input : <input type="text" title="Número" name="billing[street][2]" id="billing:s...
asked by 23.09.2017 / 15:36
1
answer

Uploading image with JS

Good afternoon, I'm trying to upload image using JS but I'm not getting it, I'm not using jQuery, I'm using Axios. So far, I've tried it that way var files = document.getElementById("inputPhoto").files; axios.post(url+'api.php', {...
asked by 18.06.2017 / 17:09
1
answer

How to use javascript code inside if Razor?

In my view, I have following code: <script type="text/javascript"> @if(Model.File == true) { //Como usar javascript aqui ? //Exemplo: $("#target").click(function() { alert("Handler for .click() calle...
asked by 13.06.2017 / 02:06
1
answer

Clicking the button makes two ajax requests, how to avoid it?

When I click the "Hire" button it makes two requests on the server at once, how can I avoid this? <button type="button" class="pagar" id="10.00">Contratar</button> Ajax $(document).on('click', ".pagar", function () { preco...
asked by 26.06.2017 / 22:12
2
answers

Efficiency of reset html x reset javascript

I was creating a button to clear form, and I came across the function of HTML type='reset' but I was accustomed to using JavaScript for this to occur. So I wanted to ask for help to understand the difference in efficiency from one to...
asked by 21.11.2017 / 13:57
3
answers

How to keep an always active div

I have this example that I need to always have an active div. It is possible that it is possible to disable all three. <!DOCTYPE html> <html> <head> <style> #myDIV { width: 30%; padding: 50px 0; text-align:...
asked by 23.11.2017 / 21:14
1
answer

Get html from a tag, including the tag itself

How would I get a part of my html along with the tags? For example: I wanted to get this span inside the TD, in case I wanted it all together, until the tag <span> , got it?     
asked by 23.11.2017 / 01:55
1
answer

Why is this replace wrong?

I have the following function that brings a string as number in javascript. It can bring float value as 10.00 and int as 12. Why is it wrong? Give as replace is undefined in the line: text.replace("R$",""); function moneyTextToFloat(tex...
asked by 16.08.2017 / 18:59
1
answer

Date format configuration in VueJS / Quasar Framework

I have a field for entering the date of birth, and I want the result of the insert to be formatted in 'DD-MM-YYYY'. I was able to make the date appear in the input in the desired formatting, however when I send the date to the database it goes l...
asked by 16.08.2017 / 15:14