Questions tagged as 'javascript'

1
answer

Cancel changes AngularJS

I have the following code to undo the changes: $pageContent = content; $scope.page = $pageContent.page; var pageBackup = $pageContent.page; $scope.cancelChanges = function() { $scope.page = pageBackup; $scope.$...
asked by 23.04.2014 / 23:19
2
answers

$ _post returns empty, I tried everything, guys. Please help me.

I have this problem and I can not solve it, the form is correct but when the user clicks the save button, the file save.php is triggered normally, but loses the contents of $ _POST .... Help me! p> index.php file <!DOCTYPE html> <ht...
asked by 16.07.2018 / 03:15
1
answer

Load items 4 in 4 in a javascript loop

Personal I'm making a request in an API that returns me some events, but I need only 4 items to be displayed first, and if a "See More" button is clicked .. should appear 4 more items at a time .. I have the following code: jQuery.ajax({...
asked by 04.07.2018 / 22:25
2
answers

How to access a jquery without id?

I always access a jquery using the command: $('#id_1') , but always in an html body that has id . How do I access an html body that does not have id , using the data-uid attribute in my case below? <img data-uid="_b...
asked by 24.08.2018 / 20:08
1
answer

Problem with Subscribe when Return is a single Object

I'm developing an angle application 6 and I'm having a problem when I do Subscribe on the method that returns a single object in the HTTP request. For example, making this request for my component: ngOnInit() { const empresaId = this....
asked by 20.08.2018 / 22:24
2
answers

Button does not run Javascript

I'm having a hard time making the button responsible for generating the alert with the lucky number to start the javascript, I'm using the code below for the javascript: <script type="text/javascript"> $('#btnGnrt').click(funct...
asked by 30.07.2018 / 21:18
3
answers

How to make hidden texts appear when you expand a menu

I have a question, As you can see in the image, this is a part of a site that the client requested. How can I make this menu where you click and it expands and shows the hidden text? And you still have that sliding effect? I'm going to...
asked by 23.07.2018 / 13:41
2
answers

ngFor does not give the expected result

My ngFor is not showing all the data that arrives, but in the console it shows all the results. I get some data from the API and it has a sales data and a meta data, they come in an array and I use the forEach in them, and if it hits the targ...
asked by 16.08.2018 / 18:12
3
answers

Insert PHP in Javascript [closed]

Hello I need to get the results of a SELECT in PHP and display in a ALERT within a function in JAVASCRIPT , where running JAVASCRIPT runs PHP and WHILE . How can I do ? I'm confused about the key...
asked by 02.10.2017 / 15:45
3
answers

How to insert a new value into an array without duplicating through the switch case? [closed]

One of my attempts so far has been: array = [1, 2, 4, 5]; definir = function() { switch (array) { case (array > 1): array.push(1); break; case (array > 2): array.pu...
asked by 11.02.2017 / 15:34