Questions tagged as 'javascript'

1
answer

Change class of a Button when it is disabled and vice versa

Good afternoon, guys I have a form with 2 inputs that I have to fill in to enable button . I wanted the button to have a color when disabled and another color when I had enabled it. I'll show the code that enables my button...
asked by 01.08.2016 / 18:18
1
answer

I can not remove cloned lines

I'm trying to create a dynamic form, I'm able to clone normally, but I can not delete the cloned items. What's wrong with my code? In that case, double clicking on the cloned "TR" would have to delete the line, but it does not work on cloned ite...
asked by 26.07.2016 / 05:52
1
answer

Send ajax requests using POST method with pure javascript

I'm trying to submit a form using AJAX through the POST method but I'm not succeeding. Can anyone help me? function gooSubmit(url,id){ //declaração das variáveis var sd = document.getElementById(id); var req = rq(); //exibi a...
asked by 27.07.2016 / 19:44
2
answers

How to add a Search bar in the header of my home (Ionic + AngularJs)

I want to create a Serach Bar in my home. I'm in trouble. Can someone help me? I will leave here my Controller and my Views a Home.     
asked by 19.07.2016 / 05:27
1
answer

Share object between two controllers in angularjs

I am studying AngularJS and I am trying to make a CRUD simple, but I am not able to have the same object of my listing for my form, that is, when I click the edit button go to the completed form by the object. I have Factory...
asked by 11.07.2016 / 18:32
1
answer

Array receiving two objects

I have two objects and I wanted to create an array this way = > [{"loj_codigo":2,"loj_fantasia":"teste 1"},{"loj_codigo":1,"loj_fantasia":"teste 2";}]} I'm getting the following objects = > Object {1: "1", 2: "2"} Object {1: "teste...
asked by 13.07.2016 / 04:00
1
answer

TemplateUrl according to object property

Hello, I have a controller with an array ($ scope.fields) with several objects inside: each object is a different form input (eg input, select, checkboxes). I'm already using ng-repeat to iterate over them, however I need everyone to load a d...
asked by 25.08.2016 / 22:50
2
answers

Problem when redirecting page, after printing using jQuery

I'm giving window.print(); to print my page, right after it I send window.location to redirect the page, the problem is that the page is redirected to the print command. I need to make the redirect work only when the user prints or...
asked by 26.08.2016 / 14:58
1
answer

Integration (angularJS) with random phrases API

I'm trying to use angularJS to pull data from the following API that generates random phrases: link Here is a snippet of the code I am using: $http({ method: 'GET', url: ' http://api.forismatic.com/api/1.0/?method=getQuote&ke...
asked by 28.08.2016 / 00:33
1
answer

Calculate the diameter of a circle to fill the rectangle according to the position of the mouse

My question is more about math than programming. But anyway ... I am creating a small script to determine the position (which is made by the mouse) and the diameter of a circle that is inside a rectangle. So far I have been able to determine...
asked by 04.07.2016 / 21:50