Questions tagged as 'javascript'

1
answer

Load javascript file only on one page

I'm not sure what to do, but I'm not sure what to do. Next, I have a system inside a Gentelella template, and by default it loads several javascript files at the bottom of the page. My code, for always repeating the beginning and end, I h...
asked by 18.08.2018 / 23:58
1
answer

Scope in asynchronous call (Javascript)

Let's suppose I had the following method: this.loadCustomers = function(){ Request.get("php/loadCustomersAction.php", (function(error, data){ if(!error) this.setCustomers(data); }).bind(this)); }; where "Request....
asked by 14.06.2017 / 19:14
1
answer

How to use C # #region in Javascript? (Visual Studio 2017)

Little use to organize my C # code: #region Nome //seu código #endregion How can I do this through javascript and Razor? @if() { //code javascript } Update: I checked the colleague's reply Cigano Morrison Mendez here and it...
asked by 13.06.2017 / 02:44
1
answer

Menu Dropdown (VUEJS / Javascript)

I'm trying to make a dropdown menu in Vue (I do not want to use Bootstrap-vue), so I created a isActiveDrop and set it to true , and every time I click the button to open it it's set to false , so the menu appears and disappea...
asked by 30.06.2017 / 21:22
1
answer

Blank space JSTL

I'm having a really annoying problem, when my jsp is mounted I have a foreach in jstl that leaves my absurdly giant final code, worse than I realized it's just white space. Here is the code: <c:forEach var="column" items="${tela.targetXm...
asked by 29.06.2017 / 15:01
2
answers

Function returns a string in place of a promise

The code below returns a promise: function getDealerships(region) { return $.ajax({ method: "GET", url: "/api/v1/dealerships?region=" + region }); } So I can wait for the server response and process the result: var...
asked by 28.06.2016 / 13:37
1
answer

how to correct this error? Exp: 125 55

How to fix this error? if you enter firstNumber = 125, and secondNumber = 055 the result: 125 > 055 if firstNumber = 125 and secondNumber = 55 result: 125 < 55 book code: Javascriptme pag 23 and 24. <body> <SCRIPT L...
asked by 02.07.2016 / 12:35
2
answers

Is it possible to only use get without the set in Object.defineProperty?

I need to get more information about the get and set attributes of the Object.defineProperty() method. I understand that get calls a function when a property is read and that set calls a function when a valu...
asked by 25.06.2016 / 02:21
1
answer

How do I put mask in the input (Total Value)

ScriptAdhesionValuefunctionmascara(o,f){v_obj=ov_fun=fsetTimeout("execmascara()",1) } function execmascara(){ v_obj.value=v_fun(v_obj.value) } function mreais(v){ v=v.replace(/\D/g,"") //Remove tudo o que não é dígito v=v.replac...
asked by 21.12.2016 / 16:57
2
answers

Set click event to an element that was inserted via AJAX after page load

I'm developing an instant search system with jQuery, Ajax and PHP. I created a navigation system for the keyboard arrows in the resulting search options. It's running smoothly. But what I want to do is that when the 'enter' keypad is pressed on...
asked by 26.04.2016 / 20:38