Posts by Douglas Garrido • 644 points
24 posts
-
0
votes1
answer421
viewsA: Receive user data before proceeding with code execution. ANGULAR
I’ll show you a code I have, sample variables only, follow: app.component.ts (Main) userService.login(data).subscribe(userInfo => { this.user = userInfo;…
angularanswered Douglas Garrido 644 -
1
votes1
answer42
viewsA: Recover Marker within multiple maps
Hello, You almost got it right, only setIcon is a function, that should be called so: marker[idNumber].setIcon('nomedoicone'); You can also pass an object of type Icon or Symbol. See more in: Google…
javascriptanswered Douglas Garrido 644 -
0
votes4
answers874
viewsA: Manipulating JS odds when using Math.Random()?
His name already says ramdom(), that is, it returns a random number. If you want to change the chances of the returned number being more even or being more odd, you can create a simple function to…
-
0
votes2
answers163
viewsA: Show the after after after the Hover
You can use the following style in your CSS: .classe:hover::before { // aqui vai o seu estilo }
-
3
votes1
answer43
viewsA: checkbox icone google in firefox
Remove the letter-spacing: 8px of the CSS that will solve. See the need for this style, if you need to, you will have to search why Firefox has this problem.
-
4
votes1
answer1091
viewsA: AJAX request time
You can use a combo with variable status and the setTimeout. var showLoader = false; $(document).ready(function () { var timeoutLoader = setTimeout(function () { showLoader = true;…
-
1
votes3
answers796
viewsA: Error calling 2 javascript functions at the same time
Put it all inside a onload only, thus remaining: <div id="nomeprodut"></div> <div id="b"></div> <script type="text/javascript"> window.onload = function () { if ('a' ==…
javascriptanswered Douglas Garrido 644 -
0
votes1
answer91
viewsA: Dotted effect on select and button in Firefox
Maybe this is the property outline of the CSS. You can disable it like this: select { outline: none } More information about this property: W3schools Outline Property.…
-
1
votes1
answer153
viewsA: Css grid and input system
Watch your class .form_campos, in it there is a height: 31px, but there is also a padding: 5px and a border-bottom-width: 1px, i.e., it takes the 31px + 5px (top) + 5px (bottom) + 1px…
-
1
votes1
answer1342
viewsA: Route in Google Maps using coordinates
As I had commented, it is not necessary to move to the properties origin and destination an address (String), you can pass latitude and longitude. For further clarification, please check the Google…
-
1
votes2
answers866
viewsA: Toggle - get true or false result
There are two inputs with the ID teste, which is not advisable to do. As @Miguel said, the first input is like hidden, that is, there is no property checked for this type of input. As I understand…
-
1
votes1
answer269
viewsA: How to get the total marker (Marker) on google maps?
As I had commented, you have already corrected the need to create two Marker objects in the Array. After that, you can check the number of markers in the variable markers using the property length,…
-
9
votes2
answers976
viewsA: Typeerror: $(...). error is not a Function
Look at the jQuery documentation, which says: As of jQuery 1.8, the . error() method is deprecated. Use . on( "error", Handler ) to attach Event handlers to the error Event Instead. That is, the way…
jqueryanswered Douglas Garrido 644 -
0
votes1
answer906
viewsA: Maps loading error with google maps api
The Google Maps API did not find the "initMap()" function, as it must have loaded before, due to the "async" attribute. Try to remove this attribute to see if it solves. If it doesn’t, set the…
-
0
votes2
answers1413
viewsA: jQuery searches in a table
When deleting the value from the search field, you should remove the style display: none, so all items will return to their original state, ie will appear again. The way your function is, it just…
jqueryanswered Douglas Garrido 644 -
4
votes2
answers1292
viewsA: How to check if HTML tag has given attribute with JS?
You can check using the method hasAttribute(), see below: document.getElementById('SizeImage1').hasAttribute('src'); Will you return true or false. More information here: W3schools - hasAttribute.…
-
2
votes1
answer137
viewsA: Change dynamic class on mdDialog.show
1. You can change via CSS itself: #popupContainer button.md-primary { color: '#000' !important; background-color: blue !important; } 2. Or, you can change the class via Javascript: var btnElement =…
-
0
votes2
answers1138
viewsA: Capture the backgroundColor of an Element in jQuery
Strange that jQuery didn’t catch the background-color, but come on: See what comes in the "item" variable of the "getBackground" function"; Try to catch the color of background using…
jqueryanswered Douglas Garrido 644 -
1
votes2
answers410
viewsA: Decrease the number of bars on the Barchart Chart js chart
Before you plot the graph, you have to think about how and what it will show, because a graph is based on values, that is, it is a visual representation of values passed by the user, data from…
chartjsanswered Douglas Garrido 644 -
1
votes1
answer64
viewsA: Show chartJS chart even if you don’t have data
From what I have seen in several libraries, including Chartjs, it is only possible to show the column with some value, even if it is zero (0). Because a graph is based on values, so if it has no…
chartjsanswered Douglas Garrido 644 -
1
votes1
answer43
viewsA: Remove sharp(#) from Crossroads.js and run without it, how do I do?
As hashs (#) are patterns in these types of library, I would not recommend taking. But if you really want to take, add a Listener in the url, so you exchange the information contained there, through…
-
0
votes2
answers2344
viewsA: Is there any way to send image by JSON to an api?
Try using the Formdata function. var formData = new FormData(); formData.append("file", $scope.file); $http({ method: 'POST', url: $rootScope.serviceBase + "users", user, headers: { 'Content-Type':…
-
1
votes1
answer528
viewsA: Google Maps Geolocation API
First of all, to get the user’s location, he must allow your site to have access to his location. But it is not always a good practice to ask for his location right away, it is necessary a "good…
-
2
votes1
answer84
viewsA: Error when injecting googlemaps script source via method
Ivan, The Google Maps Javascript API is being loaded before the Geocomplete API, where it requires the Google API. In the role you created to enter the Google Maps API, then enter Geocomplete.…