Questions tagged as 'javascript'

1
answer

I can not validate the image extension using charAt

I'm trying to do a simple validation on the extent of the images that will be uploaded, but it's not working very well so far, could you help me? Follow the code I'm trying to get it to work. var aoptionFoto = document.getElementById("optio...
asked by 14.06.2018 / 09:15
2
answers

mount url to open new tab with parameters passed by onclick

Good evening, How to make a function to handle past parameters in onclick to mount a url and open it in new tab? example <button onclick="javascript:parent.funcao1('TESTE','ABCD', 'eydub21lJzonam9hbycsJ2lkYWRlJzogJzI5J30=');">TESTE</b...
asked by 10.04.2018 / 02:07
1
answer

button sends value of field input hidden

I have a problem with the use of a specific button in the project. I'll explain: I have a window opened by the window.open command, so in this open window I have a button that takes the value of two input fields hidden in while in the database....
asked by 10.04.2018 / 14:48
1
answer

Display ajax data returned by controller in view

Hello, I'm having difficulty displaying the data returned by the controller via ajax call My js is this: var requestList = $.ajax({ type:'GET', data:null, url:"index.php/Pages/loadComentarios" }); requestList.done(function(e)...
asked by 10.04.2018 / 05:43
2
answers

When assigning an attribute to a function, is it as if I have created a variable within that function?

I'm studying JS, so I understand, when assigning an attribute to a function, it's like creating a variable within that function, is that it? for example: Original function: function copaMundo() {} Assigning a property and an attribute t...
asked by 14.06.2018 / 21:04
2
answers

JavaScript: What is the difference between asynchronous functions and normal functions

I want to know what is the difference between using async function and function only. Of course, with asynchronous functions you can use await and they return a Promise . But is there any other effect? Is there any...
asked by 09.04.2018 / 19:10
1
answer

.not () function does not work correctly

I have the following code HTML : <div id="mini-cart" class="mini-cart dropdown is-not-empty"> <span class="ic-cart"></span> <span class="count-cart" style="display:none;"><br><br></span>...
asked by 09.04.2018 / 20:41
1
answer

JQGRID change the color of the row or data if the return is NULL or White

Would I have to condition a different color if a column is blank in GRID? Something like: if Store="", red line color $table.jqGrid({ url: url, datatype: 'json', mtype: 'GET', postData: { represe...
asked by 09.04.2018 / 19:28
1
answer

How to select a photo and load the div? [duplicate]

<!--Container para colocar a imagem de perfil--> <div id="imagem"> </div> <!--Botão para selecionar a foto--> <input id="teste" class="botao_foto_perfil" type="f...
asked by 28.03.2018 / 06:16
1
answer

Attribute "display" is changing without stopping, the idea was to change only once and stop. (fadeIn and fadeOut with pure JS)

I got this code from fadeIn and fadeOut with pure Javascript on the internet and gave a little adapted, but I have a problem. I have a login card appearing to the user, if he clicks the "CREATE ACCOUNT" button, the login card disappears and t...
asked by 12.02.2018 / 22:58