Questions tagged as 'dom'

3
answers

Why use getElementById if the id is in the window?

Recently in my study I noticed an object that manipulated the DOM of the element that had the same name in its id . teste.style.border = '1px solid #CCC'; teste.style.width = '500px'; teste.style.height = '50px'; <div id="teste">...
asked by 13.04.2016 / 14:23
0
answers

Enable / Disable input when clicking on a checkbox [closed]

I have this code: function EnableDisableTextBox(quant_a0) { var txtquant_a0 = document.getElementById("quant_a0"); txtquant_a0.disabled = quant_a0.checked ? false : true; if (!txtquant_a0.disabled) { txtquant_a0.focus();...
asked by 21.11.2018 / 12:37
1
answer

Handle non-angular DOM 2

I'm passing a web system that has Jquery to Angular 2. I have a button that when clicked it adds two inputs and together with them a button is created to exclude these inputs. (follow the code in Jquery) ... //Adiciona campos extra nos sócios...
asked by 19.12.2016 / 19:51
1
answer

JavaScript click the button and calculate a difference

I need the result of the transformation to appear when I click the Calculate button. HTML <div id="principal"> <form id="form"> <input id="valorX" type="text" size="15" /> <select id="conversao">...
asked by 02.10.2016 / 21:47
1
answer

Return value processed in Javascript for the managed bean

Return value processed in Javascript for the managed bean is it possible? What's different about this process is that I run the JS method on the bean, like this: RequestContext.getCurrentInstance().execute("getResult()");     
asked by 18.09.2015 / 21:37
2
answers

When using jQuery append it displays the text [object Object] and does not insert the element

I created a div.box in the html and in it I want to insert another div that I create in the code execution, follow the abbreviation: HTML: <div class="box"></div> JS: var item = $('<div />', {class: 'item'}) var box =...
asked by 20.02.2017 / 14:50
3
answers

Check if window load is false

When I give the command: $(window).load(function(){ console.log('Site totalmente carregado!'); }); It works correctly, the message in the console only appears when the window has been fully loaded.   But for example, how do I check if t...
asked by 09.10.2017 / 14:20
1
answer

How do I get the value of a list of ckeckboxes with jquery?

I've tried the following: <input name="chklista" id="chk01" value="01" type="checkbox" />01<br /> <input name="chklista" id="chk02" value="02" type="checkbox" />02<br /> <input name="chklista" id="chk03" value="03" t...
asked by 18.12.2014 / 15:11
1
answer

How to ensure that an element will have the DOM event?

Good afternoon, Today I'm facing a rather strange bug in my application: I have a field of type textarea where I type an email body and just under it a button that when clicked gets textarea content, opens a modal and inserts the same cont...
asked by 31.10.2016 / 19:56
1
answer

How to insert dynamic rows into HTML table, and already set a class beforehand

I have an HTML table and I'm creating your lines dynamically using appendChild() , I'm just not able to set className dynamically on those lines, in the third column - "VALUE". See like this: var doc = document;...
asked by 03.06.2018 / 14:11