Questions tagged as 'javascript'

3
answers

My code does not abort the submission of the form as it should

I made a form, and before sending I check if the person entered the user and the password. I put this in the submit event, but it does not seem to work. The code: <script> subimitar = function(){ if(document.getElementByNam...
asked by 05.04.2014 / 00:25
2
answers

Zero start numbers in JavaScript

I'm having a confusing problem, in which I send a 000214 by AJAX to a PHP controller, and there it arrives with result 140 . I gave a simple console.log(000214); and the result in the JS itself was 140 . How can...
asked by 11.03.2016 / 14:53
2
answers

Rotation check in javascript

Is there any way to check the rotation of a div in javascript , for example checking style left is offsetLeft , could someone tell me how the rotation would look?     
asked by 28.02.2014 / 00:14
2
answers

How to create Javascript templates?

I would like to know if it is possible (and how to do, if it is) templates with Javascript . Just like Facelets in JSF , where you create a template page and the others follow what was pre-set. If someone can indicate some material, tha...
asked by 04.12.2015 / 18:49
2
answers

Filling two equal inputs

Well I have the following problem, I have two inputs: Desconto<input type="text" name="desconto" id="desconto" style="width: 100px" > and Observação<input readonly="true" type="text" name="obs" id="obs" style="width: 400px; heig...
asked by 07.01.2016 / 18:05
2
answers

How to do a regular expression to remove only the hyphen without removing the hyphenated arrow

I have the following expression:    00000-001-> 22222-222 I would like it to look like this:    00000001- > 22222222 I've tried various ways on this site , but I'm not getting it.     
asked by 16.03.2016 / 15:57
2
answers

How to select and pick values from all checkboxes with the checked property?

I noticed that "selecting all checkboxes with the .checked property checked is a very recurring question in web development, so I'll post a solution here using Jquery . sub> How to select and pick values from all checkboxes with th...
asked by 14.06.2016 / 22:12
2
answers

Sort Dropdown with jquery after append [duplicate]

If the user does not find the desired item in the dropdown list, it can include a new item, for this I used the prompt function of javascript , and then the user types the name and clicking Ok , if the object is not a...
asked by 19.12.2016 / 21:41
3
answers

Onclick on an option select

I'm using a select . I want the last option to call another page. <select> <option>Teste1</option> <option>Teste2</option> <option onclick="page.htm">Pagina</option> </select>...
asked by 12.02.2015 / 12:28
2
answers

Only receive money field number

I'm looking for a td with jQuery. var linhaTr = $("tbody").find("tr:first-child"); var tamanhoTd = linhaTr.find("td:nth-child(2)").text(); and it returns me for example R$ 5,00 . But I need to get back to make...
asked by 02.01.2017 / 19:45