Posts by Lucas Caires • 478 points
15 posts
-
1
votes1
answer251
viewsA: Dynamic checkbox does not work (Vuejs)
You did not create an event to change the status. You can do this using the v-on:click or shortened @click directive as in the example below: <i class="custom-control custom-switch"…
-
1
votes1
answer93
viewsA: Authentication external websites
You are passing by default a header that the server-side (Viacep) does not accept, which is X-Access. Clear your default header before the request: axios.defaults.headers.common = {}…
-
4
votes1
answer80
viewsA: Insert text on SSL green seal
You need an Extended Validation Certificate (EV SSL). It is the highest level of validation of a certificate, but it is the most expensive. To have one you will need to have a valid business, with…
-
2
votes1
answer67
viewsA: Identifying file path with pathinfo
You can use the global $_SERVER to display the running file path. $_SERVER['SCRIPT_FILENAME'] In the case of your role, you would be: function Local() { return $_SERVER['SCRIPT_FILENAME']; }…
phpanswered Lucas Caires 478 -
3
votes2
answers2781
viewsA: How to limit the size(kb) of a photo with JS?
As an alternative to jQuery mode, it follows a way of doing it using pure Javascript (Vanilla). Remembering that the size is in bytes, that is: 1024 byte = 1 kbyte var upload =…
-
0
votes2
answers1170
viewsA: How to check whether an image (physical file) exists on an external web server via an absolute URL
You can use the function file_get_contents() for that reason. <?php if(file_get_contents('http://www.exemplo.com.br/imagem.jpg')) { echo "Existe"; } ?> Remembering for this function to work,…
phpanswered Lucas Caires 478 -
1
votes3
answers2214
viewsA: Add html with jquery
You can use the method append jQuery $( "body" ).append( "Seu texto" );
-
1
votes2
answers624
viewsA: Submit form using modal bootstrap
You can capture the event directly from the button. No need to go through the modal methods and find. $(".btn-atualizar-status").on('click', function() { alert('Testando o clique no botão…
-
1
votes2
answers81
viewsA: Upload with java script
It works, both external and embedded in the code. You just need to set the correct path. I believe you have changed the code path and so it doesn’t work. If the.php test is at the root, along with…
-
2
votes2
answers90
viewsA: Button available when filling fields
First you put the attribute "disabled" to disable the button. Then you check with javascript if all fields were filled in, if yes, you enable. With a single field, it would basically look like this:…
-
0
votes2
answers438
viewsA: Bootstrap modal "data-Dismiss" bugging with position="Absolute"
Enter the property z-index to define the order of the position elements (relative, absolute and fixed) .close-modal { z-index: 1; }
-
0
votes2
answers1982
viewsA: Access files outside public_html
Why don’t you do the reverse (and more correct)? You can create a basic structure within your public_html. Something like this: /public_html /src /web .htaccess Inside your . htacess you put to read…
-
4
votes1
answer75
viewsA: Sort Mysql results by preference
I think that solves your problem: SELECT * FROM produtos ORDER BY (id IN (5,4)) DESC, id
mysqlanswered Lucas Caires 478 -
1
votes1
answer75
viewsA: Get div high up in the hierarchy
Using parents() to climb to the div "father" then descends with Children() to the div "daughter" you desire. So you can have this structure in several places because only the one that is together…
jqueryanswered Lucas Caires 478 -
4
votes2
answers2031
viewsA: Sending an image and other data via Jquery to PHP
Naturally you cannot send a file via ajax. You can use a Formdata object for this. $.ajax({ url: 'send.php', //Destino type: 'POST', data: new FormData($('#form')[0]), //Seletor do formulário…