Questions tagged as 'javascript'

1
answer

Validate form if variable1 is greater than variable2

Hello, I'm creating a form where the person must provide two values, a lower limit and a higher one, if the lower limit is greater than the upper one I would like an error message to be generated! before the form is sent. I have managed to make i...
asked by 27.11.2016 / 03:47
1
answer

Use a focus for multiple fields.

Hello, I created a function to validate cnpj in my form and I need to use a focus () for the cursor to stay in the input when the user enters the wrong cnpj, but there are 3 different fields of cnpj. I have done it in several ways, but he only a...
asked by 28.11.2016 / 12:47
1
answer

Run script after 20 seconds

I have a script but would like to make a change in it so that it appears to the user after 20 seconds browsing the site. I tried to make the change in setTimeout, but it did not resolve because it appears immediately without following the setTim...
asked by 30.11.2016 / 02:42
1
answer

Accept string with letters, numbers, or periods

I'm using the Jquery Validate plugin to validate facebook usernames, and by default it can have letters, numbers, and periods. Ex: joao, joao22, joao.maluco22 How to validate this with jQuery Validate? The default methods are as follows:...
asked by 29.11.2016 / 02:25
1
answer

how to format variable with jquery mask

I use the jQuery Mask Plugin v1.13.4 plugin I have a div where I enter a value as follows: $('#v_pg').text('PAGA R$ ' + valor_pago); Use Jquery to update the value inside the div. But I wanted it to be formatted by the Mask as follows:...
asked by 30.11.2016 / 14:00
1
answer

How to check if a select already has a selected option?

I have a page where there are some selects (representing the functions of the users, which can be: Leader, Participant or For Knowledge). There are some business rules: If the user is selected as LEADER, he / she can not have any other role...
asked by 29.11.2016 / 04:11
1
answer

Check if page was loaded after button is clicked

I have a button that calls other 4 buttons via jquery, each button opens a new tab and is in load state until the pdf is downloaded automatically, I need to verify that this page has finished loading to call the other buttons. Any suggestions?...
asked by 29.11.2016 / 20:25
1
answer

JavaScript event if it is repeated in other IDs

I wanted to make a JavaScript if it repeated in other components of the screen, in this example I'm passing I made a foreach and inside it I put my javascript. the intention is that it repeat itself 10 times, but it only works once. Is there som...
asked by 21.11.2016 / 15:12
2
answers

Image swapping problem using Javascript

The idea is to change image, after update. I have the following code: <div id="context1" data-toggle="context" data-target="#context-menu1"> <img id="SizeImage1" src="@Url.Action("StreamImage1", "Account", new { id = Model.Id }...
asked by 23.11.2016 / 17:37
1
answer

How to get an array from a table and fetch another table in Ionic and AngularJS

I have a field in a table with array numbers: 2;3;7;8;9;10;11;15;1 Each of these numbers corresponds to an ID of another table. I need to list the items in this other table according to the array. I can not come to a favorable logic....
asked by 19.12.2016 / 13:00