Posts by Dr.G • 356 points
19 posts
-
2
votes3
answers31270
viewsA: Format mask for CNPJ
I made this code, I thought it was simple. document.getElementById('produto-1-cnpj').addEventListener('input', function (e) { var x = e.target.value.replace(/\D/g,…
-
-1
votes1
answer67
viewsA: writeln is obsolete in Javascript or not?
I added the "pre" tag and it worked. <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>teste</title> </head> <body> <pre>…
-
0
votes2
answers125
viewsQ: How to disable an option when creating it with jquery
vetorAux = ["CARROS","Ferrari","Porshe"]; vetorAux.forEach(function(item){ $('select').append('<option>' + item + '</option>'); }); <!DOCTYPE html> <html> <script…
-
1
votes1
answer63
viewsQ: How to know the current position of an element in the <option>
<!DOCTYPE html> <html> <body> <select> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option…
-
1
votes1
answer475
viewsQ: Dynamic Select/Option filter
var escolas = ["UFSCAR", "USP"]; //var alunos = []; $(document).ready(function() { escolas.forEach(function(item) { $('select.lista-escola').append('<option>' + item + '</option>'); });…
-
0
votes1
answer143
viewsQ: Regular Expressions in python
How can I read a python file looking for words that fit into a regular expression, for example: search dates(dd/mm/yyyy)?
-
2
votes2
answers1244
viewsQ: Change the color of an image in css (jquery)
I have an image on my page: <img style="border:0;" src="img/corpo_menina.png" alt="" width="320" height="480" usemap="#dtb61iMap" id="dtb61iMap" /> At a time of my application, various changes…
-
0
votes1
answer40
viewsQ: Go to "home" page
How can I do through a javascript function, which is enabled the command "Home", ie the page make a jump to the top of it? Example: A button that is clicked and is at the bottom of the page,…
-
0
votes1
answer272
viewsQ: Create a video by javascript
I tried to create a video on my page that is generated by clicking the button through javascript, as follows in the code: function tocar_video(mysrc){ var video = document.createElement('video');…
-
0
votes2
answers304
viewsQ: Reset all fields (input, textarea) of the html page
How can I make that through a button all the textarea of the page has its content deleted?
-
1
votes2
answers688
viewsQ: How to save an object (JSON) by copying in Javascript
How to store the current state of a json object per copy? Because if I save by reference I lose the exact information of the object at that moment of assignment. Object example: var sessao =…
-
0
votes1
answer42
viewsQ: Save information from an array to each function call
have a function in my javascript code, in this function is filled information in a variable that will be added at the position of a vector, I will try to illustrate with parts in pseudocode the…
-
0
votes1
answer1740
viewsQ: Post a Json object to Webservice via AJAX
I am trying to send an object in Json format to my Java Webservice by AJAX, but I have not succeeded, I have tested wrong formats, which are not Json’s, as "string", and the database reports error…
-
2
votes2
answers9251
viewsQ: How to check a null position in the vector
Why do if(array[i] == null) is not correct? What would be the best way to check if that vector space is "empty"?
-
0
votes3
answers1018
viewsA: Call another class (Java)
Already got, to call the main of another class through its main class is : Nomedaclasse.main(args);
-
-1
votes3
answers1018
viewsQ: Call another class (Java)
How do I call a "class" of type jFrame for example from my main class? My jFrame has its own main that gives the true setVisible for it to appear, but I wanted to access this main of it from my main…
-
0
votes1
answer69
viewsQ: Text changes on the label with switch
You know that initial Pokemon conversation? "Welcome to the world Pokemon" - ENTER "Are you a girl or a boy?" -Enter CONTINUES.... So, I’m trying to do a Java swing, at the moment it’s like this:…
-
6
votes1
answer283
views -
5
votes1
answer550
viewsQ: Can one override in builders?
Is it possible to override in builders? For example: @Override public class main (String arg[]){}