Questions tagged as 'javascript'

2
answers

Use validation function in different HTML fields

I have the following javascript function for NIF validation: //VALIDAÇÃO NIF validaContribuinte = function(){ var contribuinte = $('#nif').val(); var temErro=0; if ( contribuinte.substr(0,1) != '1' &...
asked by 20.01.2015 / 16:49
2
answers

Creating input automatically limiting in 5

I am creating two input fields when I click the plus (+) button, I can already generate the two inputs, but I need to limit the input, I only need 5 input, I tried with while and I did not succeed, Thank you / creates more additive value fie...
asked by 06.11.2014 / 16:55
1
answer

Variable JavaScript undefined

I'm trying to pass a value through a input type hidden of the HTML generated in PHP to JavaScript, however this variable in JavaScript is like Undefined. What can it be? PHP <form name='form5' method='post'> <input type='hid...
asked by 02.11.2014 / 23:49
1
answer

How to use the ternary operator to determine what to display?

How can I properly use the Ternary Operator in JavaScript. I have the following code: var Requisitar = function(){ setTimeout(function(){ $.ajax({ url: 'https://steamgaug.es/api/v2', // Acesso direto a API success:...
asked by 20.02.2015 / 21:46
3
answers

(JavaScript-jQuery) Variables within variables giving "undefined"

Hello. I have this code that is not able to capture this variable. HTML, try 1: <html> <head> <meta charset="utf-8" /> <script src="js.js"></script> <script src="http:/...
asked by 20.03.2015 / 17:16
1
answer

How to use jsPDF addHTML?

I've been trying to use jsPDF to create a pdf for a specific page in a project. However, all the examples I've looked at that include this function (addHTML) do not work. In the developer examples ( link ) there is nothing about addHTML left ove...
asked by 14.03.2015 / 16:47
1
answer

How to change the innerHTML of a DIV, and have other elements within it that can not be changed?

I have a blog and the attribution of this blog is incorrect and not even altering works. I wanted to use a script that changed the innerHTML within this DIV but without changing any other content. Example: function setAttrib(nameof, content...
asked by 09.03.2015 / 01:37
4
answers

Warning box after div click

Hello, I wanted to know how I can when someone clicks a button to open a box in the center of the page and that the background page is blurred. I only have the button code: <a href="login.php"><div class="button"></a></...
asked by 23.02.2015 / 16:40
2
answers

PHP Submit uses the wrong file

Well, I have a problem with my code. I have 2 forms in which one is logged in and the other is a register. I am using a one page template, and I am having problems. When I do the register everything is ok without problems, the problem is when I...
asked by 24.03.2015 / 12:27
2
answers

I could not understand new cpaint ()

The code below did not understand what it means: var cp = new cpaint(); cp.set_response_type('text'); cp.set_debug(false); cp.call('../../atd/asp/atd0027m_crossbrowser.asp', 'BuscarPrestadorNome', ExibePrestadorNome, sNomePrestador...
asked by 04.09.2015 / 18:10