Questions tagged as 'javascript'

4
answers

Get first and last name of a string

I need to get the first and last name of a string. For example, if the full name is: Renan Rodrigues Moraes I only need to get Renan Rodrigues . I know what I should do but I do not know how. In case the name is Renan de Assis...
asked by 27.04.2016 / 15:29
1
answer

Force javascript to cancel field register with required (HTML 5)?

I have a registration field that is required by HTML5. However, by clicking the unsubscribe button, HTML5 does not let Javascript return to the previous page! = (Requires that I fill in that required field. How to proceed? 'click button#bac...
asked by 12.02.2015 / 12:01
1
answer

Is it possible to add personal sites to google maps v3 autocomplete?

I wanted to use the google address search but also wanted to introduce some personal areas. In div that is generated by google I can add the fields I want, but I can not create a function in click because there must be something in...
asked by 26.11.2014 / 16:33
4
answers

Is there an event that captures size changes of an HTML element?

I wonder if there is an event that captures size changes of an HTML element. For example, a div with 5000px height is 4800px and Javascript onresize() fault does not fire. Is there an event that captures this? HTML: <div id="tes...
asked by 09.12.2014 / 14:40
3
answers

Are objects similar to arrays?

Objects are arrays in JavaScript? I have difficulty understanding how this is possible: var obj = { title: 'some value' } console.log(obj['title']); // some value In my conception the use of brackets is only possible in lists to pass a...
asked by 08.04.2016 / 19:20
3
answers

Condition within a .each ()

The problem is this, I have 9 li inside a ul <ul> <li>Teste1</li> <li>Teste2</li> <li>Teste3</li> <li>Teste4</li> <li>Teste5</li> <li>Teste6</...
asked by 29.01.2016 / 16:17
3
answers

Adapt JS code to IE8 and IE9

How can I make this code work in IE8 and IE9, because it works only in 10 $("#input_file").change( function(event) { var tmppath = URL.createObjectURL(event.target.files[0]); $("img").attr('src',tmppath); }); Method that does not...
asked by 13.01.2015 / 18:36
3
answers

Turn Number into binary text

How do I get the representation of a Number (integer) in binary with JavaScript? Ex: 47 = 00101111     
asked by 04.11.2016 / 00:55
5
answers

What is the best way to create elements? [duplicate]

for(var i=0; i< numTotalPerguntasDig; i++){ strInterface += "<ul>"+ "<li class=\"col-md-2 \">"+ " <button type=\"button\" class=\"btn btn-danger btn-info-bloco form-control\">"+...
asked by 17.08.2015 / 13:57
1
answer

Form validation error in JavaScript [closed]

I'm having a validation error, when I hit the input of submit button it does not test the function of JavaScript and it goes right where action is going to go. <HTML> <HEAD> <TITLE>Cadastro...
asked by 29.11.2015 / 02:23