Posts by LipESprY • 4,525 points
187 posts
-
3
votes1
answer43
viewsA: How do I align multiple Ivs within a container?
The problem is that you divided the exact container space between the three div. So far, so good. The space of each one can be 33.3%. If you want more precise, I recommend using 33.33%. But the main…
-
1
votes1
answer60
viewsA: Hide/display elements with Jquery
I need it as soon as a div is clicked (.titulo), display another div that’s inside of her (.answer). First of all, it should be noted that the div.answer IS NOT INSIDE of div.titulo. They’re not…
-
1
votes1
answer61
viewsA: Table that changes color
First, create a class in your CSS to style each status of your record: td.pendente { background-color: red; } td.concluido { background-color: green; } Now, just add this style to the column as the…
-
2
votes3
answers184
viewsA: How to pass a personized function within a Jquery Change event?
It is possible yes. See what it says to jQuery change method documentation. Example #1 - passing function name: function teste(ev){ alert($("select").val()); } $(document).ready(function() {…
-
1
votes3
answers122
viewsA: How to obtain the contents of an HTML element from a Regex string?
Following the idea of parsing with regular expression, it could be like this: var str = '4354543/sfd f^^ <textarea id="text">Hello World! 34% #_2@.;/°? </textarea> fr fdgdf //fdg3';…
-
2
votes3
answers598
viewsA: What is the difference between keys and parentheses in an Arrow Function in Javascript?
Both previous answers already define the difference well. Only one question remained to be highlighted: When using parentheses, automatically the last expression will be returned. Example: var a =…
-
3
votes1
answer157
viewsA: Javascript, handling Unicode code
Simply print it out: <script> var i = "\u0062"; document.write(i); // imprime: b </script> "- How do I convert this code to the character it represents?" This "conversion" is done…
-
1
votes2
answers36
viewsA: How to select change <a> according to <select> with PHP
First of all, it should be understood that PHP runs on the server. So, every time the user changes the select, you would have to submit a form with action for the same page, capture the value of…
-
0
votes1
answer101
viewsA: Delete information in an HTML element with Javascript
You condition the action based on the property value of input. Therefore, if you delete everything at once, the condition will not be met, since it will be empty (''): if (cliente.value !== '') { //…
-
1
votes1
answer715
viewsA: How do I search for JSON object property values in PHP/Mysql?
I understand from your comment that your search is returning when JSON has Tag 1. Independent of object property. Example: {"title":"Tag 1", "tags":"Tag 2"} The problem is that Mysql understands…
-
1
votes1
answer22
viewsA: Handling data Websevice json
As already mentioned in my comment, you are parsing a string simple that received the URL of the webservice you want to consume: //string json contendo os dados do paciente $json_str =…
-
3
votes1
answer54
viewsA: Xmlhttprequest cannot find run
The method onreadystatechange identifies the change of the request status. So, especially in your code, you should not call the method send inside the block onreadystatechange. Put it like this: //…
-
0
votes1
answer46
viewsA: How to load HTML file using Javascript?
One option is you make a call on this "another HTML file" via AJAX and later treat as you already do, but with minor changes. See this example: index.html: <table> <tbody> <tr>…
javascriptanswered LipESprY 4,525 -
1
votes1
answer175
viewsA: Does not return Number of unread messages
whereas the AJAX request is asynchronous, you must popular your little balloon in the method success of the request. See: function novasMensagens(){ // não precisa do parâmetro: numero $.ajax({…
javascriptanswered LipESprY 4,525 -
7
votes2
answers135
viewsA: Difference between metacharacters . * and +
What is the difference between the metacharacters .* and +? The asterisk and more are quantifiers, where: * corresponds to none or unlimited occurrences; + corresponds to one or unlimited…
-
3
votes2
answers180
viewsA: How to evaluate if the user will have the source used on the site?
Via CSS you can make a list of sources to be considered for this element. If the browser does not find the first one, it searches for the second one. If he doesn’t find the second one, he looks for…
-
2
votes1
answer688
viewsA: Help with ERROR mysqli_query() expects at least 2 Parameters, 1 Given in
This response is limited to error: "mysqli_query() expects at least 2 Parameters, 1 Given in [...]" Taking a quick look at the documentation of mysqli_query(), check the following syntax:…
-
1
votes3
answers2817
viewsA: How to identify the error in PHP code by Chrome?
Place these two lines at the beginning of your code that will make PHP report and show ALL the errors and warnings: ini_set('error_reporting', E_ALL); // mesmo resultado de: error_reporting(E_ALL);…
-
10
votes1
answer3395
viewsA: Error creating table with INDEX VISIBLE in Workbench
Observing the "next syntax error" part, I risk saying that you are using Mysql version before 8.0. Perhaps version 5.7 which is the most common. See available index options according to…
-
0
votes15
answers4487
viewsA: Determine if all digits are equal
Whereas the argument received by the function will be of the numeric type, you can do one like this: script cast to string; a loop of repetition (loop) of 0 to 9; every time: fill a string (pad)…
-
0
votes1
answer1424
viewsA: Bootstrap - Overlay Div
Their div are elements brothers and does not limit the width by basing it on each other. Unless you set a static width for everyone and position them equally. When you applied the position: absolute…
-
0
votes1
answer231
viewsA: No error appears in PHP
Place these two lines at the beginning of your code that will make PHP report and show ALL the errors and warnings: ini_set('error_reporting', E_ALL); // mesmo resultado de: error_reporting(E_ALL);…
-
3
votes2
answers68
viewsA: Why is the prompt run anyway in javascript?
"- The window.prompt method is inside a variable" That statement is wrong! The right one is: the variable name receives the return of the method prompt. This means you can receive and/or treat the…
javascriptanswered LipESprY 4,525 -
6
votes2
answers182
viewsA: Is it necessary to have Node.js installed to run software with Electron?
"It allows you to develop desktop GUI applications using front end and back end components originally created for web applications: Node.js for the back end and Chromium for the front end." -…
-
2
votes1
answer333
viewsA: CPF and CNPJ Mask and Validator - Error
You are trying to load the script from the Github repository address: <script src="https://github.com/gmgomess/jQuery-CPF-CNPJ-Validator-plugin/blob/master/jquery.cpfcnpj.js"></script>…
-
2
votes1
answer84
views -
4
votes1
answer1122
viewsA: Run a PHP function with Javascript
"- call a function in PHP via Javascript" You can’t do that! PHP is a language that runs on the server (back-end) while (in your case) Javascript runs on the client (front-end). There are ways…
-
4
votes2
answers301
viewsA: Div with position: Fixed loses total container width
!!! Ctrl+C / Ctrl+V !!! When you use position: fixed; or position: absolute;, the element is Taken out of the regular flow of the Document. The default Setting for width for a while div element is…
-
1
votes2
answers1047
viewsA: Problem with CSS media queries
"- Someone would know to point out what I’m doing wrong?" I will not analyze and/or reproduce your code completely. My answer will be limited to this part: @media only screen and (max-width:…
-
0
votes2
answers99
viewsA: Variables print often
The System.out.println is inside a for, there appears several times even. For: @Sorack
-
1
votes1
answer344
viewsA: Problem with setlocale on the web server
"- the server does not accept Portuguese-Brazilian, even in the php manual that accepts" Done some research on the setlocale, I can conclude that he has no direct connection to timezone or the…
-
1
votes1
answer2494
viewsA: Configure minDate and maxDate in jQuery-UI Datepicker
In Datepicker, the attributes maxDate and minDate define the maximum and minimum date consecutively that the user can select in the calendar. There are 3 different ways to configure these…
-
2
votes1
answer647
viewsA: PHP/Mysql Undefined variable in code
Repair that snippet of your code: <?php if(isset($_POST['entrar'])) { $username = trim($_POST['login']); If $_POST['entrar'] is not defined, this clause will not be met. Thus skipping this whole…
-
8
votes1
answer6535
viewsA: How to use line break in the PHP variable that will be stored in a database table?
"- Only I would like every time I add data in this field, the items are displayed on the HTML page breaking line. That is, Each club stayed in one line." One of the many alternatives, which I…
-
0
votes2
answers74
viewsA: Modify element placement using HTML and CSS
Considering that your class .grupo was with position: relative; (I didn’t understand why), it was enough: change the positioning of the icon, through the class .icone: position: absolute; top: 40px;…
-
1
votes1
answer1923
viewsA: How to connect to Firebird database in Python?
The communication problem was in Firewall of Windows, the door 3050 was not released. - Kenta
-
1
votes1
answer962
viewsA: How to compare two Python data frames
You have a typo. Ora usa IdContrato, with i capital, and now uses idContrato, with i minuscule. for Rafael Barros…
-
4
votes2
answers637
viewsA: How to arrange JSON without quotation marks in index
"- I have the following JSON [...]" No. That’s not a JSON! You can validate this and other JSON on jsonlint.com. "- [...] no quotes on the index of each value [...] How can I fix this in PHP?" "- If…
-
0
votes3
answers459
viewsA: Insert an INPUT value based on a checkbox
"- What I’m not able to do is take the value of the checked checkbox and return the value 1 in another input within the datatable" With this simple script you can return the value of each input:…
-
3
votes2
answers53
viewsA: Query error in Mysql using PHP
As they say all the errors in your script, the indices are not defined. Note that all lines showing errors are related to $_POST: What you need to do is check the attributes name of input of your…
-
8
votes3
answers1301
viewsA: How to catch the element where my cursor is?
My answer is limited to this: "- at least which html element my mouse clicked on" Theory: capture the event click throughout the body of the site; return the element clicked on this event through…
-
1
votes3
answers86
viewsA: Alert function is not running when clicking the button
On the line 20, alter onClick for onclick and your alert() will work! Recommended reading: my answer about the event click.…
-
7
votes3
answers1856
viewsA: How do NOT differentiate upper and lower case with index?
Why doesn’t it work? The following example defines two string variables. The variables contain the same string, except that the second string has uppercase letters. The first method log has 19.…
javascriptanswered LipESprY 4,525 -
4
votes1
answer78
viewsA: The . click() could not serve as a function handler since it only works with Function() to be executed?
"- why not use the .click() and perform a function by itself without using Function()" Quick response You are wanting to "define the method" already in your own execution. That’s wrong! It wasn’t…
-
1
votes2
answers39
viewsA: Image is not displayed when reloading the page
You need to check the position of the scroll when DOM loading is completed. You can duplicate the block if/else, but a little more correct way is to create a function for such. Take my example,…
javascriptanswered LipESprY 4,525 -
2
votes1
answer296
viewsA: Error downloading images from a CURL site via PHP
"- but the images all come with 0kb" Does not come! You’re creating this image here: $fp = fopen('fotogrande/'. $fotogrande, 'wb'); The problem is that your curl is not reaching the "big image" on…
-
1
votes1
answer1135
viewsA: Set maximum upload size for PHP
About the maximum file size, it should be done like this: Configuration of the directive upload_max_filesize PHP, in the file php.ini (remember that the value is measured in bytes). See more details…
-
0
votes1
answer39
viewsA: AJAX returns the same answer
Although I did not find any logical error in your code: "- you can post your code so I can test ?" As the server’s responsibility is only to respond true or false, used admin/admin in order to test.…
-
0
votes4
answers198
viewsA: More than one value for the same appendchild()
"- How can I concatenate two values in the same appendchild?" It cannot. It is not the correct use of the method. According to the documentation, this is the method syntax: node.appendChild(node)…
javascriptanswered LipESprY 4,525 -
0
votes3
answers195
viewsA: Carousel slide.bs.Carousel event does not work
Although I have already solved, the solution I found was different: I removed the second call from jQuery, leaving only the version 3.3.1; I corrected the call from jQuery 3.3.1 that was with the…