Posts by Fernandes • 153 points
29 posts
-
0
votes2
answers190
viewsA: Why is it possible to change constant values in Javascript arrays?
I think that, in a more practical way, the explanation is as follows:: When you say the word reserved const creates a "variable" of type constante, that is, that such a variable will not be changed…
-
0
votes0
answers24
viewsQ: How to call this procedure with Javascript function
Hello, I watched a video class, on Composition of Functions in Javascript, and the teacher, at one point used a function syntax similar to this my example: function teste(valor1){ return…
javascriptasked Fernandes 153 -
0
votes1
answer189
viewsA: How to insert an image/picture into a canvas shape
Okay, after researching some more, I found that the method CanvasRenderingContext2D.createPattern() resolves. See link to the MDN Grateful for the attention!…
-
-2
votes1
answer189
viewsQ: How to insert an image/picture into a canvas shape
The code fragment below draws a rectangle in the canvas element, and fills it with the blue color. I want to fill with a figure/external image (such as background). Has as? <!DOCTYPE html>…
-
0
votes1
answer74
viewsQ: Change the cursor bar in an edit field with CSS JS or Jquery
Hello, I would like to change (stylize) the cursor bar (flashing) into edit fields in HTML pages. Not the cursor, but the cursor bar. I researched a lot here at SOPT and found very interesting…
-
-2
votes1
answer123
viewsQ: Cordova in Visual Studio - Compilation Error. Does not generate apk
I’m starting in Cordova and decided to try for Visual Studio Community 2017, which I successfully installed, only the Tools Package for Apache Cordova + Android SDK, Google Emulator. So, I created a…
-
1
votes0
answers38
viewsQ: Security policy Browsers Servers
Hi, about the CORS, I got a good look in this link, here from SOPT, But when I was testing, in practice, I found something interesting. Using the code below in a project with XAMPP and Notepad++, I…
-
0
votes1
answer23
viewsQ: Use of the resizeto() javascript method
I saw an example on MDN and tried to replicate it, but it doesn’t work, I mean, I don’t see the browser window being resized dynamically. Is such a method still used? is it coded correctly? My…
-
1
votes2
answers398
viewsQ: Why does width and height not work in this case?
Well, I’ve tested it in various ways, changing the element spanfor h6, for strong, and others, and nothing! There was no way, until now, to format the widthand height of an element within the tag…
-
0
votes1
answer82
viewsQ: Show Ajax request progress before completion (redo)
I have the code below, in which I get an ajax query for a file .php. The problem is that this way, I can only return at the end of the process, with the method success:, but I need to inform the…
-
1
votes1
answer312
viewsQ: How to align text vertically next to image?
Hello, what is missing in this code to align the text vertically next to the image, and each of the three smaller divs has an image and text. * { margin:0; padding:0; } body { background:…
-
1
votes0
answers39
viewsQ: How to catch the event when an input receives text from the autocomplete? No Jqueryui?
I need to know if you can notice (event) when I’m browsing the listbox generated by the Chrome autocomplete (for example) when it automatically plays address values, phone, etc, in the form fields…
-
0
votes1
answer77
viewsQ: what is capture, propagation and bubbling of events? One or more terms are the same thing? Examples!
I have read some posts on the subject, but it is not yet clear the concepts (and mainly examples, simple) on propagation, bubbling and list of events. One of these days, I needed to use…
javascriptasked Fernandes 153 -
0
votes0
answers45
viewsQ: How to get the updated "d" attribute from a staggered SVG path
Well, I have the following code by which I take the contents of the "d" attribute of a <path> SVG, however, need updated coordinates after using scale to increase the size of the drawing,…
-
1
votes1
answer297
viewsQ: how to make a drawing svg to be only the size of the perimeter and not of a square, as is normal
I have a vector image (SVG) created in Inkscape, but it gets a size (default ?) that is square (the dimensions), but I want the image to be just the size of its perimeter, and not simply width x…
-
0
votes2
answers123
viewsQ: How to know percentage of animation in CSS
I searched and did not find a function or property of the Animate attribute (CSS), to track and control the percentage of a CSS animation. That is, I want, dynamically, to know in how many percent…
-
1
votes1
answer68
viewsQ: Jquery.load() function does not bring the textarea element up to date
Well, I have a Chrome extension with page 1 and page 2, each with its script.js. On page 1 I can open a new tab/window when I click on a button, and when the new tab opens, the . page html 2 calls a…
-
0
votes1
answer190
viewsA: Understanding this use of addeventlistener in Cordova
Solved. Actually, the event "deviceready" is own (specific) Cordova, therefore, it is not part of the list of Javascript events. And this event is for two main things: certifying that the device…
-
0
votes1
answer190
viewsQ: Understanding this use of addeventlistener in Cordova
Hello, studying a little about Cordova and Phonegap, specifically the default application, Helloworld, I noticed the line: Document.addeventlistener('deviceready', this.onDeviceReady, false); which…
-
0
votes1
answer49
viewsQ: Understanding Regex test on MDN
Hello, searching on Regular Expression, I got a link to the MDN: [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test, But I looked, I looked and I…
-
1
votes1
answer51
viewsQ: Styling an element that is not a child of the element used in the selector
I have the code below where I want to, by clicking on the toogle (which is a input[type=checkbox]), another element, which is a class of another div, below, be stylized. In the following code, I…
-
1
votes1
answer122
viewsQ: The target of CSS selectors with pseudo-element ::before
Hello, I’m studying CSS3 and, in a given tutorial, I analyzed it all, and did not understand the point where the ::before was used together with the checkbox, in which the property was added…
-
0
votes0
answers39
viewsQ: How to make use of CSS selectors so that there are two simultaneous conditions
Look at that: The question noted as Duplicate, was of my own, recent! It has not yet been answered, because despite the indication of another link, there is diffuses the application of possible…
-
0
votes0
answers183
viewsQ: How to use an AND-type condition with CSS selectors?
Well, I’m using a CSS block where I need to change an element, but that change depends on whether two other elements correspond to a particular state; example: to change . textAlteration, the…
-
1
votes1
answer174
viewsQ: Classes and scope of php variables
You see, my question is more about how to reference and "get" the content of a variable in a PHP Class. See excerpts of the code below, where I put wrong data for the connection, on purpose, to…
-
0
votes1
answer46
viewsA: Openlayers 4: mouse click to draw a point, make mouse stick to the screen and causes the drag of the map
Look, I got the solution! It is that I was looking at a code in a tutorial that used only ol.interaction.Draw, with the event nameDraw.on('drawend', Function(e){ ... etc. Well, in the official…
-
0
votes1
answer46
viewsQ: Openlayers 4: mouse click to draw a point, make mouse stick to the screen and causes the drag of the map
Hello, I am studying the development of a map with the help of Openlayers 4, watching video lessons, I am at the stage where I created a routine with 3 buttons (Pan, Draw, Erase) to draw on the map.…
-
2
votes0
answers33
viewsQ: PDO class, how to prepare really avoids SQL Injection s
underlined textHello, I am studying PHP and, regarding POO together with PDO, I have the following question: I always see in the articles in this regard, that making use of the PDO statement:prepare…
-
1
votes2
answers881
viewsQ: Problem running str_pad in PHP
I studied the PHP function called str_pad. I happen to be able to make it work well in most cases, but.... when I put as a character to be filled, a white space " ", it occurs that simply do not…