Questions tagged as 'javascript'

2
answers

Data entry validation allowing HTML TAG

I need to do a validation, always valid on the client side / JS and server / PHP, and allow the user to enter some TAGs for formatting the final result, any tips on how to do this? Is it better to use a field of type textarea or use an ed...
asked by 01.12.2014 / 14:25
1
answer

Template Layout and Routes

I'm working on a system that uses MVC as follows, View -> HTML,CSS Model -> PHP Controller -> JS Basically, all system actions work in the following order: User triggers some action in js it valida...
asked by 17.09.2015 / 21:59
2
answers

Jquery Autocomplete

I'm having problems with Autocomplete, I can pull data but autocomplete does not work! $("#marcas").autocomplete({ source: function (request, response) { $.ajax({ type: 'GET', url: 'http://fipeapi.appspot.com/api/1/carros/m...
asked by 24.09.2015 / 17:32
2
answers

Check if it is empty regardless of type, javascript

I'm trying to create a function that checks for something blank, empty, undefined, null etc. But my difficulty is that I do not know all the forms of a string being "blank" I created this function function empty() { var args = [].slic...
asked by 03.10.2015 / 15:43
3
answers

Simulate click when opening the page

Is there a way, when someone enters a web site, a JavaScript event "simulate" a click ? In other words, JavaScript automatically makes a click on the site. In case I have an ad that only opens when someone clicks the page. That i...
asked by 28.09.2015 / 21:56
1
answer

Regex that captures data entered by user, typed in a phrase

If I have a sentence: "melhor 01/01/2016 - 05/01/2016" How can I retrieve the dates of this sentence using regex?  thus: var data1="01/01/2016" , data2="05/01/2016"     
asked by 18.05.2016 / 21:05
5
answers

Converting object properties to numbers

I'd like to know how to make the values of an object become numbers. I read about Methods valueOf() , and toString() , but I have not figured out how to use them to that end, my attempts have not worked much. Thank you in advance.  ...
asked by 03.06.2016 / 19:49
1
answer

How to implement a destructor in JavaScript?

In languages like C ++, we have the possibility to declare a destructor for a class, so that certain actions are performed when an object of this class is destroyed. How to do this in JavaScript? For example: class minhaClasse { constru...
asked by 06.07.2016 / 15:32
1
answer

How to load a plugin according to the width of the screen?

Hello, my problem is the following, I have two Plugins with similar functions, however they can not be loaded at the same time because errors occur. Is there any way to load a particular script according to your browser's resolution? Ex:...
asked by 17.11.2015 / 02:11
1
answer

Is it possible to create a site without a markup language?

Is it possible to create a website without any markup language, programming only, for example JavaScript? In general terms, how?     
asked by 20.09.2017 / 13:51