Posts by Júnior • 870 points
17 posts
-
5
votes2
answers1035
viewsA: Crop image with JS
While reading the documentation I found the function setSelect, that the solution to this problem has been demonstrated. Follow the code: $(function() { $('#jcrop_target').Jcrop({ minSize: [200,…
-
4
votes2
answers512
viewsA: Return of Xmlhttprequest connection
It’s very simple, just check the property status AJAX request. For example: var xmlHttp = new XMLHttpRequest(); xmlHttp.open('GET', url, false); xmlHttp.send(); xmlHttp.onreadystatechange =…
javascriptanswered Júnior 870 -
1
votes1
answer7206
viewsA: Adjusting the site to any screen
This is because you are not indicating that you should check the minimum size, to check the screen size the correct code is this: @media only screen and (...)
-
1
votes1
answer263
viewsA: PHP + mysql - insert mysql basedata all file name and path
The code I redid all the code, but oriented to objects and using PDO (PHP Data Object) I tested the code and it is working perfectly. How I used your database data just run the code. I also changed…
-
1
votes3
answers348
viewsA: Login to Paypal
I never used the API of Paypal, and as I don’t have a Paypal account I don’t even know if the code works. I believe when you see this this example who uses this class will be able to develop your…
-
1
votes2
answers58434
viewsA: Background image, using css
For this there are 2 probable reasons: Informed image (images/html.jpg) does not exist You did not include CSS in the file. The 1° can be solved by accessing the image if it exists so you did not…
-
11
votes1
answer789
viewsQ: Download text from a textarea as a server-side language-free file
I need the user to click a button to download the text that is within of textarea as a JSON file, for example: User click on button lower -> Start downloading the file textarea.json An example…
-
3
votes2
answers352
viewsA: Showing one icon to directory and another to other files
I made a version of your code, only using the class Directoryiterator, the code below checks the type and just continue the switch to get the result you want. foreach ( new DirectoryIterator('css')…
-
7
votes2
answers402
viewsQ: "Variable system" with regular expressions
I have a file like this: %usuario: 'Anônimo' Olá <b>%{usuario}</b> (This is just an example and this is not the real case), but I believe that if I were to explain the real problem it…
-
0
votes4
answers1241
viewsA: Problem in CSS and JS path in MVC project
Let’s assume that this is the structure of your website: /principal /css /img /js /blog If you want to load a stylesheet from the blog directory, just load it as follows: <link rel="stylesheet"…
-
0
votes2
answers122
viewsA: Error with jQuery Colorpicker
Uncaught Typeerror: Object [Object Object] has no method 'Colorpicker' This error occurred because the Colorpicker library was not included correctly, I recommend as opposed to using a library use…
-
3
votes2
answers374
viewsA: Joining Modal Bootstrap with HTML5 History API
I’ve never used Bootstrap before, but I tested the code and it worked fine: $('#myModal').on('show.bs.modal', function() { window.history.pushState(null, null, "/modal-aberto"); });…
-
2
votes2
answers273
viewsA: Switch with several POST
The way you wish I know no method, but with a little creativity (and gambiarra) there is a way. switch ( [$_POST["estado"], $_POST["distrito"]] ) { case ['Indiferente', 'Indiferente']: // ... break;…
-
16
votes5
answers17254
viewsQ: Generate multiple random numbers without repetition
I’ve made some attempts to make a function that returns random numbers that don’t repeat themselves, I’ve made some attempts but none have succeeded, if you can show me a function that does that…
-
4
votes4
answers16118
viewsA: What is the difference between Static and self in PHP?
Self A keyword self Accesses a property within the class and is equivalent to: $this. Ex.: class Foo { function __construct() { return self::bar(); } public function bar() { return "bar"; } } When…
-
2
votes3
answers2494
viewsA: Table css type excel
Another alternative to the one cited by Zuul is to use the property contenteditable in the td that you want to make editable, as you can follow by this example on Jsfiddle. Upshot:…
-
16
votes3
answers4980
viewsQ: What is the usefulness of the til operator in CSS?
When reading some codes I see that it is common to use the tilde (~) in the selector setting. Ex.: .effeckt-show.effeckt-modal-wrap ~ .effeckt-modal-overlay { ... } Code taken from Effeckt.css.…