Posts by Andrew Ribeiro • 1,718 points
81 posts
-
3
votes1
answer1590
viewsA: Print variable in div with javascript
Never forget to use window.onload in order to execute your code JavaScript after the HTML elements are ready to be manipulated. I created an example for you to see change in real time. window.onload…
javascriptanswered Andrew Ribeiro 1,718 -
1
votes3
answers3113
viewsA: Consuming HTTPS web service
I consume this webservice on my system and also have no digital certificate. The code I use is the following: public static Address consultaCep(String cep) throws MalformedURLException, IOException…
-
1
votes1
answer408
viewsA: How to send forms automatically without using Ubmit and without updating the page
Good night Nicolas, To achieve this you must have some knowledge in AJAX and JavaScript. I’ll try to explain how this would work. First, you must know when the select has been updated. To identify…
-
0
votes2
answers355
viewsA: How to reference HTML elements without ID in C# Windows Forms
You mean picking up the DOM elements using JavaScript and then send this data to C#? You can use in addition to document.getElementById(), the document.getElementsByTagName("td")[0] note that the…
-
2
votes1
answer659
viewsA: Popular table with data according to input range values
Good night Erick, If you just want to assemble the tables according to the input user, no language is required back-end, just a little bit of JavaScript is enough. However, I imagine you want to…
-
0
votes1
answer811
viewsA: Dropdown menu form Does not appear when clicking button
Good afternoon Renan, To achieve its goal using the Bootstrap Dropdown, no need for any JavaScript additional. I modified your code based on the templates provided by the bootstrap site. And it’s…
-
1
votes2
answers249
viewsA: Do While enters infinite loop
If I understand correctly your objective is to execute the operations while the user enters a code of the operation, be it '+', '-', '/' or '*'. If that’s it, you do while is reversed. Right is…
-
4
votes2
answers1038
viewsA: Change the div border and at the same time show the value in another HTML tag
In addition to what @nicematt suggested, you are setting a class to the div and is trying to catch the element using getElementById. I made a modification to your code, now it’s working. I hope I’ve…
-
2
votes1
answer464
viewsA: Can View talk directly to Model?
In the definition of Gof (Gang of Four), the only communication allowed between Model and View is using the Design Pattern Observer. No problem at all view "chat" with a model as long as this…
mvcanswered Andrew Ribeiro 1,718 -
2
votes1
answer853
viewsA: Run Servlet before loading index.jsp
Good morning Guilherme. There are many ways to achieve the goal you want. Using a Filter like @Dilneicunha suggested is one of the ways. Another interesting way is to edit the tag…
-
0
votes2
answers77
viewsA: Jquery Display and Hide Div Problem
I didn’t notice in your code any instructions to enable the display of div outworking. I made a small modification and now your code is working. PS: Avoid using the onclick property of tags, use…
-
0
votes1
answer5171
viewsA: Javascript program to calculate bhaskara formula does not work
Good morning Luis, I refactored your code and now it’s working. Your problem was in the name of the variables you must have made some slip at the time of typing: Where: var valordebneg = valordeb *…
javascriptanswered Andrew Ribeiro 1,718 -
0
votes1
answer219
viewsA: Range of Jquery loading
The method delay() would not work in this case because it only delays the next instruction Jquery chained. Something like: $("#minhaDiv"+v).load("pagina.php?par="+v).delay(3000).toggle("show"); In…
-
0
votes2
answers224
viewsA: How to recover a previous value typed by the user?
Just do like this: int temp = s.nextInt(); if(temp == -1){ num = -1; }else{ //caso o valor nao seja -1 vai adicionar no ArrayList notas.add(temp); //pega o ultimo valor digitado }…
javaanswered Andrew Ribeiro 1,718 -
0
votes0
answers178
viewsQ: Upload images increasing the file size by almost 10x
Good afternoon dear programmers benefactors. I have a problem, as I described in the title, that is affecting my image uploads. The image increases up to 10 times the size. And I’m not talking about…
-
1
votes1
answer960
viewsA: Link two classes
To be able to create any account whatsoever, as you have a foreign-key account within account, it is necessary to first create the client, have the Id customer, to finally register the account. It…
javaanswered Andrew Ribeiro 1,718 -
3
votes3
answers7251
viewsA: How to read keyboard numbers in C#?
If it is C# you can use the Console.ReadLine() but do not forget that the ReadLine() returns a String, so you need to convert. You can use the Convert.ToInt32(Console.ReadLine());. Then stay: int…
-
0
votes2
answers553
viewsA: Backup email IMAP OR POP what difference?
IMAP and POP are two communication protocols generally used in exchange for Emails. In the IMAP protocol, the application that uses it connects with the mail server and synchronizes messages in real…
-
2
votes2
answers362
viewsA: Is it possible to store user inputs by the Scanner Class in a database?
If you already have all the correct information in the variables (If no inconvenience occurred using the Scanner object) then you can save in the database using an object PreparedStatement I’d be…
-
1
votes1
answer75
viewsA: Make Number Change In Descending Order
I made some changes with your snippet. Make sure that’s what you want. el = document.getElementsByTagName('a') var x = 0; function voltar(limit) { if(x == 0) x = limit; for(var i = 0; i <…
javascriptanswered Andrew Ribeiro 1,718 -
1
votes2
answers188
viewsA: Get information from multiple files in one directory
You can try an alternative solution: File folder = new File("caminho-da-sua-pasta"); //crie uma pasta File[] listOfFiles = folder.listFiles(); //crie uma lista de arquivos //Vamos passar num loop…
javaanswered Andrew Ribeiro 1,718 -
1
votes1
answer943
viewsA: Put Youtube video as website background
Felipe, good afternoon. You can place a youtube video as background using a modified youtube link itself. This link contains additional information both on pathInfo how much in parameters Using an…
-
1
votes3
answers823
viewsA: Method that returns parent class to daughter class
Have you tried casting? var func = new Funcionario(); func = (Funcionario)Teste(func); Since Funcio is also a Person a simple casting should work.
-
1
votes1
answer204
viewsA: Error making javascript request
Your request is successfully exiting the browser. However, some server-side error is occurring. Normally, the 500 error is a simple NullPointerException. If you cannot identify the error on the…
-
0
votes1
answer664
viewsA: tooltip cut by div
Good afternoon Larissa, You didn’t get to comment on your code and I don’t know if you’re using (almost certainly, yes) the Bootstrap framework. In bootstrap there are two components similar to what…
-
1
votes3
answers347
viewsA: Favorite facebook style button
You can use AJAX request to do this. I suggest you create 3 classes for the button. A class for the normal state (let’s say, default) A loading class while the operation is still running in the…
-
1
votes3
answers2371
viewsA: How to use one if inside the other?
You must use the else if(statement)which means: "IF YOU DON’T PASS THE TOP IF, TRY THIS". In your case it will stay: cout<<"Digite quantos Gol(s) o Brasil fez: "; cin>>b;…
-
2
votes1
answer400
viewsA: How to use Js events without html
It is not working because the moment you take the element, it is not yet ready to be loaded by Javascript. To do this, you need to add the following line: window.onload = function(){ //seu codigo…
-
0
votes1
answer37
viewsA: How to print a redirected page?
Using the function print()Javascript is not possible without some tricks. An alternative you could do is load the page you want to print using the method $.load() Jquery, save all the contents of…
jqueryanswered Andrew Ribeiro 1,718 -
0
votes3
answers564
viewsA: Javascript color transition
If you want to make everything invisible, then it would be the other way around, the opacity starts at 1 and goes up to 0. It is possible yes. I advise using the $.Animate function of the Jquery UI…
javascriptanswered Andrew Ribeiro 1,718 -
0
votes1
answer489
viewsA: Update JSP chunk via Servlet
One solution would be to create the 3 header structures on the page and make them invisible. You make them visible according to the return coming from Servlet. This return can be a simple json.…