Questions tagged as 'javascript'

1
answer

Check List check and exclude only existing items

I have a check-list done in js, where the user types the task and it appears in the list. But I can only mark as "task completed" or "delete task" the existing tasks, that is, when I include a task I can not delete or mark it. Follow codepen:...
asked by 15.02.2018 / 03:49
0
answers

Refresh combobox with data from another Rails table

I have a "professions" field that appears inside the "patient" table. The field "professions" is autocomplete with gene chosen. I want to create a "new profession" button where when searching the combobox and not finding the desired profession,...
asked by 13.11.2018 / 00:20
0
answers

Unauthorized Text to Speech Watson IBM

I have a problem when trying to make a request through the api text-to-speech, when trying to make the request it gives the following error: { "code": 401, "error": "Unauthorized" } My JS code $(function () { $("#btnPOst"...
asked by 13.11.2018 / 12:30
1
answer

How to transfer data from one function to another?

The initial idea of my personal project was to develop a basic system for dividing payment between n customers who consumed n products, in order to train my skills. For this, the central idea would be to feed two simple blocks of input, one fo...
asked by 13.11.2018 / 10:20
0
answers

PreventDefault SweetAlert2

I have this function that overrides all my native JS alerts, however, sweetAlert does not automatically give preventDefault , which causes the next lines of code to run immediately after the alert is displayed. Is there a way to get eve...
asked by 13.11.2018 / 13:42
0
answers

How to get a javascript variable from another page?

For example, on a page it has a script tag like this: <script>var X = "variável que quero pegar";</script> How could you get this "X" variable on another page just by url and transpose it to the current page? Consider that the...
asked by 19.11.2018 / 22:58
0
answers

Show and Hide Div Element - Toggling When Clicking

I'm creating a video page on Google's Blogger. When I add 1 or more videos on the same page the server shows this code. As you can see, each code corresponds to 1 video. How do I not display all the videos? Would it be that although...
asked by 20.11.2018 / 02:47
1
answer

How to access the object window from another page

I am making a request via Ajax, I can capture the html, but I wanted to have access to the object window of the page that made the request, is it possible? Example how I'm using. $('#link').click(function(){ $.ajax({ url: 'www.goog...
asked by 12.11.2018 / 01:56
0
answers

AngularJS - Choose item from a form and create list

Hello I have a json file with items, I need a form that when entering one of the items, it is loaded into a list along with the other information of that item and is saved in a list in the view. I have the form that when entering the item thi...
asked by 12.11.2018 / 14:11
2
answers

How to prevent an addEventListener from running multiple times in a function?

I will explain my situation. I have a function that displays a particular ad to the user in the application. After viewing this ad, I call an addEventListener, which passes a CLOSE event. After this CLOSE event is triggered, the user is rewarded...
asked by 12.11.2018 / 11:48