Posts by MarceloBoni • 6,385 points
228 posts
-
0
votes2
answers151
viewsA: switch does not show the expected result
I tested here and it worked, is a gambiarra, but meets your need, as I want to test more of a value in the case, I have to create a array, as @Maniero said, the case doesn’t work that way where you…
-
3
votes2
answers18872
viewsA: How to leave current date in text field
You can do it in two ways, take the current date of your server, with PHP, ASP or Java, or take the current date of the client, via JS From the server, with PHP: <input id='data' type='text'…
htmlanswered MarceloBoni 6,385 -
5
votes6
answers41250
viewsA: How to prevent Submit from an empty form?
Another way [that personally, I find quite simple and complete] via JS is instead to use a submit, wear a button with a function salvar(). Inside the function we create the business rules and if all…
javascriptanswered MarceloBoni 6,385 -
18
votes4
answers35777
viewsA: Is HTML a programming language?
HTML, Hypertext Markup Language, it’s not even a programming language, it’s just a markup pattern, as said in the @Maniero response, HTML is not executable, it needs an interpreter to read its…
-
3
votes1
answer449
viewsA: PDO connection file. How to use?
Well, your doubt was 'half' vague for me, I mean, half is just not to say completely, but anyway... The archive PDO that Voce must be referring to works as a classe, usually create a separate file…
-
2
votes8
answers481
viewsA: I can’t learn syntax for
Different structures of repetition: Enquanto(while), Para(for), Repita(do) All three work for the same purpose, they run a line of code until the pre-set condition is reached.... o While and the Do…
-
1
votes3
answers14211
viewsA: Pass data through POST with jquery
The marker is missing success: function(data) {$('#').html(data);} $.ajax({ type: "tipo de requisição... GET ou POST", data: { seus dados }, url: "sua página", success: function(data) { //Se a…
-
1
votes2
answers1115
viewsQ: Count visible and active inputs in my form
Well, I know that the Jquery Validation does something similar, because it only blocks a required field, if it is active, see example(In this case, if Voce accepts the "Please agree to our policy"…
-
1
votes1
answer151
viewsA: Recover checkbox values with Validationengine
Well, after a lot of hard research and a lot of work, I was able to solve the problem, and I leave here the solution in case someone needs to use the validationEngine with checkBox.... To use the…
-
1
votes1
answer151
viewsQ: Recover checkbox values with Validationengine
I am trying to find the best way to send my fields via Ubmit to PHP to validate. I have a form with 4 checkboxes where at least one has to be valid. I am using the Validation Engine, in PHP I work…
-
0
votes1
answer135
viewsQ: DB Nosql, when to use?
I work in a company that the data flow is not so great, however the amount of information that is already recorded in the bank are considerably large.... Yesterday in college we argued about the…
-
2
votes1
answer693
viewsQ: Force at least one field to be required
I have 4 Checkbox in my form HTML, I am working on validations only with Jquery.Validate, there is a way that I define that at least 1 of these checBox is triggered? Some property of validate? Or…
-
1
votes1
answer1589
viewsA: How to pass variable Session in a Hidden input in php
First place at the beginning of your file. <?php session_start(); ?> Second, as much as it is a session variable, for it to be populated in a form field, it is necessary to give a ECHO in it.…
phpanswered MarceloBoni 6,385 -
5
votes7
answers762
viewsA: Randomize results with PHP
In php is what they said.... rand(1,9) As it comes to banner, something like an image... it would not be better to bring by js? var numero = Array(); //Populando o array de 0 a 8 for (i=0; i < 9;…
-
3
votes3
answers2982
viewsQ: Find out if a website is on or off
Is there any PHP function to find out if an IP address (meaning website) is in the air or not? I found this function on the WEB but she did not satisfy me.... it takes too long to load. function…
-
6
votes6
answers1673
viewsA: Big job or small job?
I believe this varies greatly according to your need.... Often we can break large functions using recursiveness and/or using little pieces of smaller functions that make up together what the big one…
-
1
votes3
answers9349
viewsA: Disable all inputs from a form using css only?
The only point to add to the comments above is that if the user has any debugger, he can rehabilitate the form fields.... at least enough to edit the content.. and so maybe submit the form.. A…
-
2
votes3
answers1803
viewsA: How to take the result of select and mount HTML?
You can do this in two ways using PHP and/or JS . . . the first is riding the Query in PHP, running it and mounting on the page itself... in which case you should have a connection to the bank, I…
-
1
votes2
answers73
viewsA: Error in Python language
I am not a connoisseur of the Phyton language, but I am a programming enthusiast who loves to know new languages and new paradigms of language.... so I read on the web, the logical equality operator…
pythonanswered MarceloBoni 6,385 -
2
votes1
answer163
viewsQ: Msxml3.XMLHTTP In which case is it used?
I was reading the following topic: Ajax request with pure Javascript (no Apis) There they show the following line of code: var XMLHttpFactories = [ function () {return new XMLHttpRequest()},…
-
4
votes2
answers54
viewsA: Is it possible to check the fields?
yes... a way to do this in php: $str = $_ POST ou GET['sua variavel'] $posição1 = str_split($str,1); switch ($posição1) { case 'P': //Faz o que voce quer; break; case 'S': //Faz o que voce quer;…
-
3
votes2
answers17094
viewsA: How to validate password through Javascript
Your code is correct! <html> <head> <title>Reset de Senha</title> <script> function validarSenha(){ NovaSenha = document.getElementById('NovaSenha').value; CNovaSenha =…
-
49
votes7
answers21565
viewsQ: Why is the use of frames and iframes considered bad practice?
Well, I started developing WEB a short time ago, say 1 year. and here in the company we use a lot frames and iframes... I know that in the HTML5 view frames are obsolete, but I still see a lot of…
-
2
votes2
answers363
viewsQ: Problems with session_start() in Safari browser
I am using the Safari browser, and am programming in PHP 5.5. inexplicably safari does not secure session... nor actually creates! In other browsers my system works correctly, only in Safari has…
-
0
votes6
answers57963
viewsA: How to convert UTF-8 characters in PHP
depends on the encoding you are using at each step, all have to be configured with the same encoding pattern.... if what Marta said does not solve, tries to use utf_encode, sometimes the exchange of…
-
1
votes8
answers6579
viewsA: Check user browser in PHP
Old, it is interesting that we know how to identify the browser and of course, inform the user, but the most important thing is to adapt the system so that it works in ALL possible browsers...…
-
0
votes4
answers853
viewsA: Click event only works the first time
Well, by the time Voce closes the lightbox style="display:none" in the div of the said whose, then it will never appear again, the cool would be that every time Voce triggers the button, it adds a…
-
3
votes3
answers727
viewsA: Does complex code interfere with application performance?
for sure! an algorithm of the type: for (i, i<n, i++){ for (j, j<n, j++){ for (k, k<n, k++){ exec algo; } exec algo; } exec algo; } will have a complexity n 3 While an algorithm of the same…