Questions tagged as 'javascript'

2
answers

Center div within scroll

I have a parent div that has scroll enabled and a width limit, underneath it I have another div with content. I want to centralize this content in relation to the parent div so that the content is centralized, note: <div class="scroll"&g...
asked by 20.01.2017 / 13:26
2
answers

Div positioning with jquery

Well, with the help of some people here in the stack I'm modifying my tooltip system, it's almost ready, but I'm having a problem. When I use very large text in the 'masterTooltip-left' class of the tooltip bug, it does not line up correctly...
asked by 06.12.2016 / 19:10
1
answer

Post in two tables simultaneously in AJAX

The code below it is working, however my question is: Is there any way to do a post on two different addresses simultaneously using that same code without repeating it? For example, in the code below I insert data into a table, but there are...
asked by 03.02.2017 / 12:52
2
answers

I can not read the result of my cookie in Chrome Browser, what to do?

I have following code: In the file cookieSimplescont2.js : function criarCookie(valorCookie){ //Criar objeto data var data = new Date(); // setando o tempo de vida do cookie data.setTime(data.getTime()+120000); //Cri...
asked by 06.02.2017 / 20:44
4
answers

How do I insert the value of a variable within an HTML attribute using pure Javascript

I'm trying to insert a value that I'm getting from the url inside the HTML attribute, as follows: I've done this function function urlId() { document.getElementsByTagName("BUTTON")[0].setAttribute("data-channel-external-id", "qs.id");...
asked by 05.02.2017 / 02:23
1
answer

How to use an ajax return in any part of the script?

I have a Json that is returned via ajax, I wanted to be able to manipulate this return throughout my script, out of the scope of Ajax, so I do not have to do a function that does everything within that scope. That way it's working, but it does n...
asked by 05.02.2017 / 02:07
2
answers

Add object within an object

is as follows, I have 3 tables. Cities, Bodies and Reasons. 1 City can have several bodies, and 1 orgão several reasons. My problem is that in a single page you have to appear all the organs of the city and within the organ all reasons of the...
asked by 08.02.2017 / 13:32
2
answers

How to get a value from a json from a string.string

Having a JSON of type: {"HOME":{"INTRODUCAO":"midias/video1.mp4"}} How to get the value midia/video1.mp4 from the string var key = "HOME.INTRODUCAO"; I've tried: var key = "HOME.INTRODUCAO"; $.getJSON([CAMINHO DO JS...
asked by 10.12.2016 / 23:13
2
answers

Optimized excerpt writing in javascript (semantics)

Hello, everyone! I would like to know the correct way to write this simple snippet of JavaScript: When you click on the ".more" div, all the ".content" divs are expanding. What is the correct semantics of writing so that a click on the...
asked by 14.12.2016 / 00:14
2
answers

Pick Selected UL Element

I need to get the Name only of the Element that I clicked on, but when I search for textContent all the li appears <li class="folder folder-open Selected"> TesteNfseSPO <ul> <li class="file">TesteNfseSPO.sln...
asked by 13.12.2016 / 13:24