Questions tagged as 'javascript'

1
answer

How to insert .php page inside an HTML element with JS

Hello, I'm calling a page .php with method load , its problem is that when I give include to something it should be include './dir/arquivo.php'; after load loads the page % is forced to stay this way to work...
asked by 11.03.2017 / 16:21
1
answer

JavaScript load PartialView passing a Model

I need to call a PartialView in my JavaScript but I'm not sure how. I'm using a plugin that in the variable TARGET receives a Div. And in my case, this Div I put in being a Partial View. My JS looks like this: var modal = new Custombox....
asked by 23.03.2017 / 15:59
2
answers

Count and compare number of keys and values between objects

I am using JavaScript objects to transcribe the interface of an app, however, I would like to create a tool for collaborative transcription but I do not know how to proceed. In a simplistic way, the object has indexes, items or sub-indexes wi...
asked by 22.03.2017 / 17:16
2
answers

Hide div with fadeToggle when clicking outside it

It has a li with the 'user-login-menu' id that when clicked opens a div with a sub-menu, but you can only close it by clicking again on li. I would like it to be possible to close the div by clicking both on and off the li. I have tried with...
asked by 22.03.2017 / 18:26
3
answers

Javascript set value in Modal Bootstrap

I have the following javascript code: function chamarModal(valor) { $('span.nome').text(valor); $('#pagamento-modal').modal(); } How do I set this content of the valor variable in my modal bootstrap? I tried the above cod...
asked by 22.03.2017 / 03:10
1
answer

Video player with RANDOM button

This video script plays a playlist, in this case 10 videos: <style> /* CSS da playlist */ #player { text-align: center; } ul#playlist li { display: inline-block; width: 40px; } ul#playlist li.active a { text-decoration:...
asked by 23.03.2017 / 04:40
1
answer

Div To Print

I'm using a JS code that works great for printing: function printdiv(divID) { var headstr = "<html><head><title></title></head><body>"; var footstr = "</body>"; var newstr = document.all.it...
asked by 24.04.2017 / 17:10
2
answers

How can I combine a checkbox with a switch?

I'm trying to validate the marked response on a form. The intention is to create a multiple-choice question where if the marked item is correct it presents a response, if not, that presents another message. The right answer appears to me, but...
asked by 25.04.2017 / 01:06
1
answer

Export function using third-party package

I have a piece of code that I use to consume a API and I use this same snippet in several files. So I created a module to export such a configuration: 'use strict' // Module to access woocommerce API endpoints var woocommerceAPI = requ...
asked by 24.04.2017 / 23:11
1
answer

Reload table without refresh with Ajax jQuery

I have a table that has the option to update records, but I need to change a record when it changes dynamically in the table without having to refresh. is already working the part of the server it already changes the data and tals .. but I need...
asked by 24.04.2017 / 19:42