Questions tagged as 'javascript'

1
answer

Take the ID of a record in a PHP table with JS

Cordial Greeting. I need your collaboration. I have a php table: with BD records <td id="<?php echo $row['Solc_idx']; ?>"><input type="button" class="btn btn-primary" value="Procesar"></td> The case is that th...
asked by 09.11.2018 / 16:22
1
answer

Problem with requiered tag

Good, I have the following code. window.onload = function () { var placa = document.getElementById('placa'); placa.onblur = Validar; } function Validar(){ var placa = document.getElementById('placa'); placa.addEventListener('i...
asked by 08.08.2018 / 20:12
1
answer

Carousel of photos - prev next - that does not consider the display: none

I'm creating a photo carousel. I have a list of several thumbnails but they are only visible 3 at a time. Clicking on one of them is shown below in large and with a text. My theme is the organization of these three elements: <p>&l...
asked by 08.08.2018 / 19:23
1
answer

JavaScript: .push is not a function

How are you? I'm practicing some JavaScript, since I'm new to it, and I'm trying to create a "space invaders" game with p5.js. I have made some progress, but, I have encountered a problem that I can not solve: var ship; var aliens = []; var m...
asked by 09.08.2018 / 23:37
2
answers

Make a request get to a web page with Javascript, "error no 'access-control-allow-origin' header [duplicate]

I need to use the get method with pure javascript or with jquery to get the information I do not care if it takes the whole body of the page or just the JSON data, try in several ways and it never works for me I always get the < strong> "error...
asked by 09.08.2018 / 18:15
2
answers

How can I generate a dynamic id from 1 to 10 with js

I have a problem wanting to generate a dynamic id for my input of a form ... $(function() { $('#imagen1').change(function(x) { addImage(x); }); function addImage(x){ var file = x.target.files[0], imageType =...
asked by 29.08.2018 / 17:56
2
answers

A .serialize () does not take the form data

I have a problem with jQuery. The problem is that I have an AJAX request to send me two data to another .php page that asks me a question. <script type="text/javascript"> $(document).ready(function(){ var data=$("form").se...
asked by 28.11.2018 / 22:28
2
answers

how I change the backgroung of a higher div when I pass over the menu

I'm trying to make a dynamic menu that changes the bg of a page. But I have problems that I change the background if I do it with the general background of the page if it comes out, but in a div, no. function menu_id(id){ docum...
asked by 23.08.2018 / 05:25
2
answers

Remove duplicates of an array of JSON objects in javascript (Angular 5)

I am trying to eliminate the duplicate elements inside a json object that is in an array but I can not do it, try with filter and with map but it seems that I can not access the json object, that is, I refer to it, here I show a example of the a...
asked by 11.08.2018 / 18:31
2
answers

Problem with NavBar "jump" when doing Scroll (shrink)

I added CSS and with JQuery I do that when the user scrolls, the NavBar is "compressed" along with the logo, the problem is that when scrolling, the navBar behaves strangely and "jumps". How can I fix that detail? Link to the code in action...
asked by 10.08.2018 / 17:01