Questions tagged as 'javascript'

1
answer

PWA - How to use the beforeinstallprompt event?

I have a Progressive Web Apps and am trying to create a function to know how many users "install" or not my app. According to the documentation ( link ) I have added the following code below the function that calls the Service Worker.js:...
asked by 30.08.2017 / 15:18
2
answers

How to execute a Python command with JS?

I have a button and when I click it I want js to execute a .py command on the server side. How do I do this?     
asked by 17.07.2017 / 14:52
1
answer

How to create expandable banner only with HTML5 and CSS3?

I need to create a banner in HTML / CSS that uses only two images in JPG / GIF. The first image will have 300x250px and the second image 600x250px. The first image will be displayed and the mouse over will expand and display the second image....
asked by 08.06.2017 / 20:43
1
answer

Confirmation dialog using angular

How do I instead call this default browser alert (of addition confirmation) call a screen defined by me? or manipulate this alert and be able to apply css. $http.post("http://localhost:8080/rest/tarefas", $scope.tarefa) .success(function(d...
asked by 25.07.2017 / 18:05
1
answer

Trying to upload JPG via Javascript and Ajax [duplicate]

I've created the following form below on a client's website, so that you can change a user's photo: <form id="formulario" method="post" enctype="multipart/form-data"> <div class="blocoCampo"> <span> Escolher nov...
asked by 28.06.2017 / 19:12
2
answers

When using prototype (JS)

What's the difference between: Person.prototype.sayHello = function() { alert("Hello, I'm " + this.firstName); }; and Person.sayHello = function() { alert("Hello, I'm " + this.firstName); }; ?     
asked by 21.08.2014 / 20:35
1
answer

jQuery Masked Input - Is it possible to recover the mask attached to the field?

I'm using jQuery Masked Input Plugin with jQuery Validation Plugin . When a form field loses focus, the validation plugin shows a message, but this is not happening with the fields that are have masks, perhaps because the blur event happens a...
asked by 26.02.2014 / 21:32
1
answer

The hover on GreenSock fires all animations instead of just one

I have a list with several images, and when with hover , there are 4 animations, one overlay , another bg of overlay , the image caption appears and another "read more" text also appears. All the animations I've done with jQuery, exce...
asked by 24.02.2014 / 20:16
1
answer

How to do multiple image uploads with Rails 3?

I created a scaffold with the name "property", I need to add images next to it preferably in a different model referencing (1 property can have many images), where the user can select more than an image. The idea would be to create a button...
asked by 21.02.2014 / 13:39
1
answer

Google API JSON Return

I make a request to a Google API (API Web Service), in which I get a JSON (Matrix) ... My problem is when trying to extract data that are Arrays inside Arrays ... Like field data "Photos", follows a piece of the return JSON. { "html_attribu...
asked by 13.02.2016 / 19:03