Questions tagged as 'javascript'

3
answers

Why is 'getAttribute ()' not a function?

I'm trying to access the xlink:href attribute of a <a> within an SVG. But when I try to access this attribute, Console Log returns that getAttribute() is not a function. HTML: <svg version="1.1" id="svg-...
asked by 18.11.2015 / 19:29
2
answers

How to force download of local information in the browser? [duplicate]

I'm trying to do something like this: $('button').on('click', function() { obj = {}; $('pseudoform').find('input,textarea').each(function() { obj[$(this).attr('name')] = String($(this).val()); }); json = JSON.st...
asked by 03.07.2017 / 20:47
2
answers

Check if button is disabled - JavaScript

I have this button, and I need to check with JavaScript if it is disabled, but I do not know how to do that. Here's the HTML: <button type="button" title="Finalizar Compra" class="btn btn-proceed-checkout btn-checkout no-checkout" disabled=...
asked by 11.07.2017 / 16:05
3
answers

Trying to fill an array with today's days up to thirty days from now

Hello everyone, I'm trying to fill an array with days from the current day until 30 days from now. Here's a problem: if today is day 8, in 30 days it will be 38, but I want the count to go back to 1 from the maximum day of each month. To work...
asked by 08.08.2017 / 14:28
2
answers

Get all information from the file that came from the input file

I know that it is possible in PHP to receive a certain file and get all information about it, such as extension, size, date, among others. I'd like to know how you can get this information with javascript. The user needs to select an image...
asked by 27.06.2017 / 13:52
5
answers

Join two Jsons in a single object

I have the following json: { "razao_social":"INTELIDER", "nome_fantasia":"INTELIDER LTDA", "rg_insc_estadual":"123456" } And another json: { "usuario":{ "login":"gleyson", "senha":"987654" } } I nee...
asked by 26.06.2017 / 20:38
2
answers

Change phone mask

Hello I'm trying to change a mask from a field on my form. Below in the field highlighted in blue, it is as it currently is, and in the second field it is how I want it to be (without the space between ) and 1 ). I want to change...
asked by 21.07.2014 / 15:43
4
answers

How to make an alert with animated echo?

How to make a more animated echo, I'm using the following PHP code, which contains a alert() of Javascript: session_start(); $credito = $_GET['credito']; $soma = @$_SESSION['valor_total'] += $_GET['valor']; if($soma > $credito){...
asked by 04.02.2014 / 19:21
4
answers

I can not make an onchange event to change a photo when we select the select field

When I select a select option it would appear that a different image appears in the img I created, but it is not working. HTML code <select id="produtos" onchange="mudaFoto()"> <option value="">Selecione o Produto</option&...
asked by 08.03.2014 / 21:25
3
answers

Fade effect on image exchange with jQuery

The following code makes an "image fader" in a div that I have in my document. However, the effect is very 'dry', I would like to have a transition during the exchange of images, like the fade effect of jQuery. var images = ['image-1.jp...
asked by 26.03.2014 / 02:16