Questions tagged as 'javascript'

1
answer

Access variable from within function: scope problem?

How do I access the dados variable from within function ? Example below: var dados; PagSeguroDirectPayment.getBrand({ cardBin: this.pedidoSoft.numCard, success: function(response) {...
asked by 07.07.2017 / 03:23
3
answers

Doubt random string with Javascript

I need to return 2 random strings 'John' or 'Mary' to implement in the following table .. I already ran a Google search, but I could only return the integers, not the strings. Thank you! Follow the code ... for(i = 1; i<=30; i++) { var maxi...
asked by 11.07.2017 / 16:35
3
answers

Problem with onkeyup in input

I did a little JavaScript function to do a dynamic search in the database without giving refresh and it is working, but I think there is a problem with onkeyup . When entering text in the input field and then deleting this text,...
asked by 08.07.2017 / 15:13
2
answers

How to count the elements of a li in jquery

You can count the elements that are inside the li, but that is by step, for example first take the li1 and count the elements that in the case has to return 3 and then move on to another li. <ul> <li id='li1'> <a>elem...
asked by 16.07.2017 / 13:35
2
answers

Failure / Doubt change jquery event

Hello, I'm having a little problem with a checkbox. When the checkbox is true, two fields should be visible (by default these fields are invisible), otherwise the fields will be invisible. The checkbox works normally, but if I close the modal...
asked by 05.07.2017 / 02:42
1
answer

JavaScript development

You were prompted to create a function that changes the paragraph to bold when the mouse is positioned over it. However, I can not solve it. If someone can help me, below is part of the code. function changeTipo(){ document.getElementById(...
asked by 17.04.2018 / 14:59
2
answers

Save / Recover files with PDF extension

To save files with PDF extension in the database do you need to do the conversion to base 64 ? Or would you have some other way to save this type and your recovery for viewing? The code I have below, does the image conversion to base 64 ,...
asked by 10.04.2018 / 20:14
2
answers

problem with form with tabs

I took a code on the internet that configures tabs, everything works fine, except that when I change the tab and return to previous, the data entered in the form has been erased and the masks of the fields are also lost. This is the config code:...
asked by 04.04.2018 / 15:13
2
answers

When clicking on a radio button, disable textarea

How can I disable the textarea when I click on a radio button that is listed according to the information coming from a database. See below: IwouldlikethatwhenyouclickNo,thejustificationtextareareferenced,wouldbedisabled.Theinitialcodelooksl...
asked by 03.04.2018 / 20:53
1
answer

How to get the elements of a json?

I have a return of a request in the following format: In there are the types of cards json has returned. I want to get each type without manually typing their names. Currently I can get it by doing this: response.paymentMethods...
asked by 03.04.2018 / 22:33