Questions tagged as 'javascript'

1
answer

0,1 + 0,2 === 0,3 - FALSE [duplicated]

0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 How can it be resolved so that 0.1 + 0.2 results in 0.3?     
asked by 30.08.2017 / 09:17
1
answer

Do not insert repeated data into MYSQL

I'm trying to upload some files to MySQL as a project, but the problem is that if I select the file 2 or more times it comes back and uploads them. The idea is to make when you try to upload the file read the rows and say that X number of c...
asked by 31.08.2017 / 20:52
1
answer

Problem when "preloading" images

I have several images on the web page. What I need is that when loading the page all the images are loaded the same (for example, the drawing of a clock, this I do to load the web faster) and that they "pre-load" the correct images in cache. Whe...
asked by 19.09.2017 / 09:22
2
answers

PHP insert multiple fields to database

A question at the time of entering a comments to a worker to the database through his ID only I enter a single comment not the multiple that I can add through the textbox. <script> $(document).ready(function(){ var i=1;...
asked by 31.08.2017 / 11:44
1
answer

Check whether or not the attribute value of a JSON exists?

When checking if the following values exist for the "propertyName" attribute, I want it to show it to me if it does not exist . But the problem is that I get repeated values , as many times as objErrList.length there is. If it finds value, it...
asked by 21.09.2017 / 11:08
2
answers

How to pass a variable from ajax to an open web using location.href

Very good, I have an ajax function that calls a file and returns a variable, once I have that variable that is "objJson", I would like to open a page and pass that variable objJson. I hope you understand. function login(){ usuario=$('#idUsuari...
asked by 20.09.2017 / 11:40
1
answer

PHP web service consumed by JavaScript

I need to create a simple web service in PHP and consume it from Javascript. I do not know if I should use Soap, nuSoap or Rest (I did the tests with nuSoap). None of the examples I find work for me. I just need the basic structure of a re...
asked by 21.08.2017 / 22:13
1
answer

Submenu with bootstrap

Hi, I'm doing a menu with Bootstrap, but when I want to do a submenu, it does not open the submenu, to open a menu I use an onclick function, but in the submenu it does not work and closes the menu. This is a fragment of my code <nav class=...
asked by 22.08.2017 / 23:58
2
answers

Why should I instantiate certain classes?

* Because the class string should not instantiate it to use a function of its prototype? , example: * String.prototype.mayus = function(){ return this.toUpperCase(); }; var frase = "mayusculas".mayus(); console...
asked by 08.08.2017 / 21:28
1
answer

Legend hidden by default

I have a legend that when I load the page is opened by default and what I need is the opposite, that when loading the page is hidden and if I need to open it click. My code is: $(function() { // Set cursor to pointer and add...
asked by 22.09.2017 / 15:29