Questions tagged as 'javascript'

1
answer

Separate an array of JSON into columns and rows

I'm getting an array of JSON in the back end like this: {"idDistrito": "23", "nome": "rere", "codigoDne": "154545", "cns": "565665", "entidade": { "idEntidade": "1", "nome": "Entidade 01" }, "e...
asked by 11.12.2017 / 12:37
4
answers

css does not work with div added with append

I have a list and I add the elements with the jquery append, and the elements of the list do not capture the css of my styles file, it simply ignores. Why? html: <ul id="list_arquivos"></ul> css: #list_arquivos{ list-st...
asked by 10.12.2017 / 15:52
1
answer

How to clean an @Html.TextboxFor using JavaScript?

I'm trying to clear the value entered in the TextBoxFor field from the following form shortly after the submit. @BHS_Treinamento.WebApi.Models.Curso @{ ViewBag.Title = "Cadastrar"; } <h1>Cadastrar</h1> @using (Html.Be...
asked by 23.02.2018 / 19:32
5
answers

Regex with JavaScript - Taking only part of String

Let's say I have the following string: str = "http://www.google.com/joao.pedro?a=b"; So I want to get just john.pedro using JavaScript . I think you can do with Regex somehow, can anyone help me how? I thought of something like,...
asked by 01.03.2018 / 04:28
2
answers

Search DDD by city [closed]

I'm making an application that has phone numbers. To make life easier for users, I would like to return the DDD that is not in some numbers. Someone knows some API, or something like that to return the DDD according to the city.     
asked by 23.12.2017 / 21:06
1
answer

JavaScript - Content of a TD comparing with a variable

I am making a script that cleans the following 3 elements. Home In If the clause has to fall into the true (I made the query through console.log and have to fall into the true one, however it falls into the false position.) Can you help me figur...
asked by 30.11.2017 / 13:50
1
answer

Passing a variable in a modal bootstrap

I am developing a system in php mvc, in the administrative panel there is a page to manage users. On this page I have a table with ID | NAME | EMAIL and on the side a button to edit the data. When I click this button, I make a call to a mod...
asked by 05.11.2017 / 00:02
1
answer

Get SRC value from Source tag with JS

I have to get the SRC value of the Source tag from this code: <video id="vp1_html5_FC" preload="auto" width="100%" height="100%" controls=""><source src="http://www.blogger.com/video-play.mp4?contentId=23bfbcf30d33ff96"type="video...
asked by 06.11.2017 / 00:42
2
answers

Catch the value of an input and return alert

I'm trying to return a value from an input that gets the value of a variable that also gets the value of a small equation, but I'm not getting it. The code looks like this: function calcularimc() { var formulario = document.getElementBy...
asked by 14.01.2018 / 14:00
1
answer

Execute JavaScript within the meta tag parameter

Is there any way to do what I said in the title? I tried it that way but it seems to me that it does not perform the function: <script> function imgPrincProdu(){ return $('.flickity-slider > img').attr('src'); } </script> &l...
asked by 17.01.2018 / 12:24