Questions tagged as 'javascript'

2
answers

How to save two variables from a JS in php session?

I wonder if there is a way to save these two variables. Here is the code: <script type="text/javascript"> function opcao() { $(document).ready(function() { var empresa = $('#Empresa op...
asked by 18.05.2016 / 14:30
2
answers

Print the result of a for JS within a p

I'm doing a college job that consists of making a tabletop generator. It is working perfectly when I use console.log to show the result, but when I use .innerHTML = resultado to show on a <p> tag it only shows one l...
asked by 08.11.2018 / 23:30
2
answers

How to specify a CSS class for text that breaks line in an HTML element?

Most of the time I work with text within HTML elements, I use a CSS resource called line-height . Suppose the height of a specific element is 50px , so I put line-height with 50px also so that the text is centered....
asked by 20.02.2014 / 02:54
2
answers

Change src of images through jquery

I'm using the Animated Responsive Image Grid plugin and want to change the images src through Javascript / Jquery. HTML code: <div id="ri-grid" class="ri-grid ri-grid-size-1 ri-shadow"> <ul> <li><a href="#"><...
asked by 22.02.2014 / 02:21
1
answer

Why am I missing input values when opening and closing an iframe using Javascript?

Context: I have an application that uses php + html + css + '"> jquery ). In it I have a page called principal.php that contains an iframe: <iframe src=pedido.php/> within calling pedido.php , as we can...
asked by 05.02.2014 / 20:02
2
answers

Move div when mouseover

How do I create the effect similar to this site: link When you hover over the div containing the image of the project, another div appears on the same side as the mouse. That is, if you move your mouse over the right the div will enter o...
asked by 13.04.2018 / 21:01
1
answer

How to clone an element with jQuery and add a new name?

I'm using the jQuery CloneYa plugin. to clone elements of a form with jQuery, but it is a bit limited, I wanted to clone the inputs but I need to increment the name when done, for example: <input type="text" name="produtos[qtd][1]"...
asked by 17.03.2014 / 15:36
1
answer

What is reactivity in JavaScript?

I see frameworks as Angular, Vue, React, the concept of reactivity . I'm totally uninvolved in the subject, and from what little I know, the concept of reactive programming is basically the realization of asynchronous data flow. A variable...
asked by 10.11.2017 / 13:02
1
answer

How to execute PHP file from function in JavaScript?

I have the following structure for registering a new MySQL database account (register.php): <?php $con = mysqli_connect("meu_host","meu_user","minha_senha","banco"); mysqli_query($con,"INSERT INTO contas VALUES (" + $id + ", " + $pass...
asked by 25.03.2014 / 04:09
3
answers

what is the difference between gift and virtual gift?

I saw a framework that worked with virtual dom and for that fact it became faster than the others. (framework: facebook reactjs) What is the advantage and disadvantage in each? How do you work with each one? Example in pure js     
asked by 07.12.2014 / 17:08