Questions tagged as 'javascript'

1
answer

JavaScript does not check for blank fields

Good Night, I have a problem with my JS code, I ask him to check if the fields are empty, but when I execute the function with the empty field, it does not deal with it, it simply ignores the if's, validate, but what I think are examples very si...
asked by 14.01.2018 / 05:10
3
answers

How to prevent background scrolling when opening a modal window with javascript?

How do I get the background to stop scrolling when I open my modal window? I already tried some options with javascript but all continue scrolling. Follow the code: HTML: <div id="openModal" class="modalDialog"> <div class="b...
asked by 17.01.2018 / 19:07
3
answers

GET via jQuery on a different server, problem with CORS

I'm trying to make a call GET/AJAX to a URL which is different from the one I'm calling, but I always get the message in the browser:    Failed to load link : In 'Access-Control-Allow-Origin' header is present on the requested...
asked by 07.11.2017 / 14:36
2
answers

how do I capture the value of this input when I click enter in the input and without using form?

How do I capture the value of this input when I click enter on input and without using form? input , shown below: <input id="searchinputid" type="text" class="searchinput" name="txtbuscan" placeholder=" Search..." onkeyup="showUs...
asked by 03.11.2017 / 17:20
1
answer

List all states in the JS and Mongo Node

I'm trying to assemble a function to list all states and then print inside an object. Sorry to be so noob, I think it's a pretty silly problem. States function listarTodasOsEstados(){ var estado = [ 'AC', 'AL', 'AP', 'AM', '...
asked by 28.10.2017 / 20:30
1
answer

How to make a filter with a text field

I want to use the value of #search as the filter (only the name field of JSON) for v-for . The text entered in #search and how the filter will actually be indifferent to me, what I really want to know is how I use t...
asked by 29.10.2017 / 20:25
2
answers

Input not being checked via php

I have the following input : <input type="radio" id="isgift0" name="isgift" value="0" class="arredondado" <?php if(Mage::getSingleton('core/session')->getInputMensagem() == 1){echo "checked='checked'"} ?> /> Trying to...
asked by 29.12.2017 / 20:48
2
answers

What is the easiest way to sort DOM elements using pure JavaScript?

How can I sort elements in the DOM using pure JavaScript , to be clearer, we assume that we have a static product page, and the products have a field to sort by price. body { text-align: center } select { border: 0; font-...
asked by 04.01.2018 / 12:48
2
answers

Displaying div with jquery

Good afternoon, I want to show the content within each div of this, but not to achieve: <?php for ($i = 1; $i < 10; $i++) { ?> <div class="cada-texto"> <a href="">titulo <?= $i ?>&...
asked by 04.01.2018 / 18:07