Posts by Henrique Pauli • 426 points
19 posts
-
0
votes3
answers49
viewsA: Resume counting if you exceed options
So, I just remembered how it’s done, I apologize for taking up your time. Just use %, in case: var num=NUMERO_ATUAL % MÁXIMO; This will keep within my maximum range. So following my example:…
-
0
votes3
answers49
viewsQ: Resume counting if you exceed options
This question will probably be answered in less than 5 minutes of so easy, but I’m cracking my head... I’m going to simplify a lot here, but I think I can understand: I create elements by…
-
2
votes3
answers67
viewsA: Insert into database table with second form
From what I’ve seen you detect the click on .btn_contact, a button that is in both forms, so far nothing wrong. But when it comes to pulling the data from the form you just pull an ID…
phpanswered Henrique Pauli 426 -
0
votes1
answer164
viewsA: Each line in the "textarea" give a different return. Using form and javascript to create a code generator
Yes, it is possible, you just have to see how you want it to work, you can separate each link by a comma for example, or even line break (as in the example below). NOTE: I used jQuery in this my…
-
0
votes1
answer30
viewsA: Pre-configuration of functions
You can do this in a few different ways. DEFINE A CONSTANT or variable and then call it in your code. Ex.: <?php define("ID_FACEBOOK","SEU_ID_AQUI"); ... enviaMSG(ID_FACEBOOK,"Você está…
phpanswered Henrique Pauli 426 -
2
votes2
answers1373
viewsA: Ajax request to return Forbidden error 403?
As I said in my comment I think the problem is that you are sending too many requests to the server. Imagine the following: Every second you send a request, if one of them takes more than 1 second…
-
1
votes1
answer115
viewsA: Toggle update Mysql database automatically
I didn’t quite understand the difference between state and field, but I believe that field will pass which field you want to enable or disable notifications and the status is yes and no. If this is…
jqueryanswered Henrique Pauli 426 -
1
votes1
answer39
viewsA: Problem with jquery with multiple Forms
At the beginning of your jQuery you don’t pass any ID to SUBMIT. It doesn’t know who to apply the event to. You can apply something better with classes. Give your forms a class, say "formAjax"; And…
jqueryanswered Henrique Pauli 426 -
2
votes1
answer27
viewsA: send attr value for $.ajax
I tested your current code here, it doesn’t really pass anything to PHP, but then I removed the last two lines of ajax and it worked: }, cache: false, contentType: false, processData: false }); for…
-
3
votes3
answers58
viewsA: How to concatenate a variable in the middle of another variable?
Look I don’t know if this you can do, but you can do in array. For example: $name="clientes"; $defaultList['clientes']= "Lista de clientes"; $defaultList['representantes'] = "Lista de…
phpanswered Henrique Pauli 426 -
0
votes1
answer355
viewsA: Setar Interval every 1 second
Create your setInterval and save to a variable, then when to execute the function you remove the range by the created variable. Example: var verificar; function iniciarVerificacao(){ if(verificar)…
-
1
votes2
answers37
viewsA: How to add Divs from a past Select number?
You can loop with the select value. $(function(){ // Use desta forma caso suas divs fiquem dentro de um elemento apenas para elas: $("#seletor").on("change",function(){ var…
-
1
votes1
answer77
viewsA: Foreach in sending emails
You need to foreach and assemble the message before the sending code then. Something like: $mensagem=array(); // Vou salvar cada fatura como mensagem nesta array // Criar cabeçalho da mensagem…
-
0
votes2
answers71
viewsA: Image preview
You can leave as the default image a path to an explanatory image (something like: "Select your file") or even a clear 1x1 gif. This way will show that image until the user selects from it. <img…
-
0
votes1
answer67
viewsA: Repositioning li with Jquery
Use the jQuery prepend for this. For example: $("#pai").prepend($("i.fa.fa-comments").closest("li")); Just put this on after you update the messages. (Oh and of course, instead of i.fa.fa-comments…
jqueryanswered Henrique Pauli 426 -
1
votes1
answer43
viewsA: Increase the size of the shield
You can use VMIN instead of pixels. So the size will be set equal to the smallest screen size. In case the PC would be the height of the screen, and the mobile phone standing would be the width.…
cssanswered Henrique Pauli 426 -
1
votes1
answer49
viewsA: Edit a contract template with jquery
You can use the dragstart and dragover events in combination with jQuery to do this, I made an example for you. But beware: This code is just a reference, it only changes the name once. (since it…
-
0
votes1
answer222
viewsA: Change button class after filling all fields
I didn’t understand if it was to have two buttons or one and change. Well I think it’s the second option, so I made a code here that should show you how field verification works. $(function(){ //…
-
1
votes2
answers73
viewsA: How do I make sure I can’t book the same Equipment for the same day and time?
You can use the mysql_num_rows($query) to see if there is already a result for your query. In the case: $q="SELECT * FROM reservas WHERE id_equipamento= '" . $atride . "' AND horario='".$hora."' AND…