Questions tagged as 'javascript'

2
answers

How to search in datatable and get only the cell searched?

I want to search your search engine and get only the cell you are looking for, not the whole row, what I want to achieve is equal to this link the list of users is in a table. $(document).ready(function() { var table = $('#ex...
asked by 26.01.2017 / 03:41
1
answer

Is there a way to make a screenshot using javascript?

I would like to know if there is any way to do a screenshot using javascript , I have found how to make a screenshot of a url but what I need is to capture the screen that the user is viewing. Thanks in advance.   ...
asked by 01.01.2017 / 21:19
1
answer

Validate 2 regular expressions in a

I have the following regular expression /^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i To validate emails, I must also validate that the email...
asked by 28.03.2018 / 14:24
3
answers

Get variable name in JavaScript

I have the following: function Class(){ this.getInstanceName = function(){ // ¿Es posible obtener el nombre de la instancia? algo como: return getInstanceName(); }; } var classInstance = new Class(); // debe imprimir: classInstan...
asked by 29.12.2015 / 17:52
3
answers

How to avoid page redirection in an alert with Javascript and jQuery?

When I show a JS alert, it redirects me to the start of my page and all the information in a form is lost and what I want is to show the alert but not redirect or recharge. How can I avoid redirecting, after accepting the alert ?, the alert is t...
asked by 10.06.2016 / 21:52
3
answers

Get the property of an object if I have the name of the property as string

I have an object of objects. Represents each programming language and its respective color (source: github ): colors = { '1C Enterprise': { 'color': '#814CCC', 'url': 'https://github.com/trending?l=1C-Enterprise' }, 'ABAP': {...
asked by 18.01.2018 / 14:40
3
answers

Limit input type color only to black and white

I'm making a script in which you can change color with input type="color" What I want is that in the input instead of choosing the whole range of colors it gives, I can only choose between white or black. Is that possible ??...
asked by 10.10.2016 / 11:40
1
answer

Difference between the constructor and ngOnInit in Angular2

I have been looking at the documentation of angular 2 about the Lifecycle but it is not clear to me. What is the difference between the constructor and ngOnInit?     
asked by 13.10.2016 / 07:47
3
answers

How to pass variable from javascript to twig?

The following code is for me to load on the page a CSS or another depending on the chosen theme. This code works perfectly on page HTML pure, but when I try to take my application Symfony not found a way to pass the JS %%...
asked by 05.08.2016 / 15:34
2
answers

How to validate special characters in a text field

The problem I have is that I need to validate a text field so that it only accepts ";" and "_" . So far it does not work for me with the code I have. Code: function doNotSubmitFormOnEnterPress(event) { if (event.keyCode ==...
asked by 19.05.2017 / 15:36