Posts by Gustavo Carvalho • 350 points
12 posts
-
6
votes2
answers1186
viewsA: Block access to javascript files
The moment the AJAX request is performed, it will always be possible to trace. Because, the origin of the request is made in the client. So, what can be done is to do a validation on the server.…
-
0
votes1
answer341
viewsA: View in PHP MVC project
To view is where you will put the output of your application, but often it becomes necessary to do some encoding, so you can create views with extension. php. Illustrating: Assuming you have to list…
-
3
votes2
answers140
viewsA: Problem inserting data into a vector
@Rodrigo, You just declared the attribute Porta porta[], why are you giving NullPointerException; In case missing initialize: Porta porta[] = new Porta[100]; //um vetor de 100 portas Ref.:…
-
2
votes1
answer237
viewsA: GET image/gif with jQuery
Kevin, Good night. In reality when you make an ajax request, through a $.ajax, $.post, $.get, the requests will always be an XHR, but the content of the response can be a datatype: jpeg, gif, png,…
-
0
votes2
answers294
viewsA: include is only inserted after the <body>, and would like it to be included earlier
I didn’t quite understand your doubt, but follow an example: <html> <head> <?php include "metas.php"; ?> </head> <body> ... </body> </html>…
-
0
votes2
answers507
viewsA: Difficulty with rewriting friendly Urls
In relation to HTTPS, it is not recommended to make a 301 redirect for this, due to SEO. For this just enable HSTS in Apache2. With HSTS enabled, all user navigation on your domain/subdomain will be…
-
0
votes1
answer118
viewsA: Redirect site with . htaccess
You can try something like this: RewriteEngine on RewriteCond %{REMOTE_ADDR} 127\.0\.0\.1 RewriteRule $ /outrapagina.html [R=302,L]
-
0
votes2
answers554
viewsA: Emergence of the excited Div
To animate the menu the moment the click event is triggered, you can use the method .animate jQuery. To learn more I recommend that you see the documentation: http://api.jquery.com/animate/…
-
0
votes4
answers7389
viewsA: How to make Ajax requests, with Jquery, on different domains?
What content does this request return? You could use jsonp, so you can make cross-Omain requests; To see how this works, you can see: https://learn.jquery.com/ajax/working-with-jsonp/…
-
2
votes1
answer323
viewsA: Good MVC practice
This is Diego speaking, follows a hint of how you can organize your system: Admin Resources controllers models views Portal ( Front ) Resources controllers models views I have worked on some…
-
1
votes1
answer1096
viewsA: Load combobox with $.getJSON data
Fala Rafael, When you use .val(valor) in a combo box, you are actually selecting an existing box box. To popular a combo box through database results, you can do this: var frutas =…
-
1
votes1
answer914
viewsA: How to increase div by clicking link?
Here is an example of how to make this animation using Javascript (without jQuery). var c = document.getElementById("testeDiv"); c.addEventListener('click',function(){ var elemento =…