Posts by Tobias Mesquita • 22,900 points
750 posts
-
1
votes3
answers664
viewsA: Mobile dynamic iframe
Renan, to access the div.map you need to make sure that it is already loaded, for this you can use one of the following options: jQuery: $(document).ready(function () { //seu codigo aqui. });…
-
1
votes1
answer103
viewsA: How to load recursively chained scripts with javascript?
Rafael, making this kind of management can be a little complicated, possibly we will miss some situation, etc. In any case follows a small implementation: //o primeiro argumento deveria ser a url do…
javascriptanswered Tobias Mesquita 22,900 -
0
votes1
answer63
viewsA: jquery prepend moving page
Pilati, a simple solution to your case, is to jump to the current element. var url = location.href; //Armazene a URL sem o # var topo = "ul30"; //id do elemento que você quer exibir no topo…
-
1
votes2
answers1250
viewsA: How to send a form automatically when inputs are completed?
Look, you don’t need Javascript to accomplish this, you can use the tag required. <form method="post" id="form1" action="teste2.php"> <div> <label for="gols1">Time1</label>…
javascriptanswered Tobias Mesquita 22,900 -
4
votes2
answers1327
viewsA: Would it be feasible to save session user data in Sessionstorage?
Techies, I don’t think it’s legal to store the decrypted User Password, either on your Database server or in the User Browser. So I believe there’s more to be rethought here, first let’s think about…
angularjsanswered Tobias Mesquita 22,900 -
1
votes3
answers149
viewsA: How to delete a DIV if there is a word in another DIV in jQuery?
you will not be able to perform multiple queries using the index, but you can use a regular expression. var testes = {}; testes.teste1 = "Nada a encontrar"; testes.teste2 = "JBL Motors";…
-
1
votes2
answers376
viewsA: Subconsulta in Lambda
you can do so: var processos = from processo in db.EstagioProcess group new { ClienteId = processo.ClienteId, EpId = processo.EpId, EP = processo.EP } by processo.ClienteId into grupo select…
-
0
votes1
answer49
viewsA: Query with sum of values in sql server 2008
you can: WITH CTE_VALORES AS ( SELECT (P.DESCONTO01 / 100 ) * P.PRECO AS DESCONTO_PRECO_1, (P.DESCONTO02 / 100 ) * P.PRECO AS DESCONTO_PRECO_2, (P.DESCONTO03 / 100 ) * P.PRECO AS DESCONTO_PRECO_3,…
sql-serveranswered Tobias Mesquita 22,900 -
0
votes1
answer345
viewsA: Mark checkboxes as indicated on a JSON
Just like @Sergio pointed out, your ties don’t make any sense. In any case, you just need to scroll through each element of the Array rs, then go through the values of each object.cklist.split(";").…
-
3
votes1
answer62
viewsA: How do you make a spine stick when it reaches the extremities?
Carlos, first thing to do is to delimit an area for your columns, you can use an element that wraps to the left column and to the right column, then add a "scroll" event to this container, this way…
-
3
votes2
answers1104
viewsA: Regex string javascript
Fabio, if you want to replace all the accents and diacritic, you will possibly need a list containing the char base for each char. using the algorithm below, you will be able to generate a very…
-
0
votes2
answers1043
viewsA: How can I use Javascript to limit the number of checkboxes that can be selected?
first thing you must do, replace the “ and ” for ", this is interfering with your HTML, so make your inline events receive the parameter event as an argument. second point in the myFunction store…
-
0
votes1
answer683
viewsA: Swap select option according to option selected in another select
Ivcs, since you want to load the second select dynamically, it is interesting that the asyncrona call (AJAX) returns a JSON. unfortunately I am not a PHP connoisseur, but doing a brief query on…
-
2
votes2
answers99
viewsA: How to make a div have the dimension of an image and display it?
unfortunately you will not be able to do this only with css, you will need Avascript. var images = document.querySelectorAll(".default-img-size"); [].forEach.call(images, function (imagem, indice) {…
cssanswered Tobias Mesquita 22,900 -
1
votes2
answers71
viewsA: Adding table line with javascript does not work onchance event of Buttons
Zica, when you use $(".upload").change(function () { ... }) or $(".upload").on("change", function () { ... }), it applies the event only to the elements already on the page. so that these…
javascriptanswered Tobias Mesquita 22,900 -
0
votes4
answers1845
viewsA: How to identify Focus in a div?
Hugo, the solution here is quite simple, you should come to see each of these set of elementos as a componente, for example the elementos down below: <div class='box'> <label…
-
1
votes1
answer89
viewsA: Macros in coordinates related to the textarea
Gabriel, I think it’s best to take the cursor position on textarea. var selection = {}; selection.Start = 0; selection.End = 0; var campo = $("#campo"); var inserirMacro = $("#inserirMacro"); var…
-
0
votes2
answers52
viewsA: Problem with <select> animation
Hugo, I had to do a similar implementation for some time, I’m going to post it here, maybe help you to give you an idea. var containers = document.querySelectorAll(".container");…
-
13
votes3
answers21403
viewsA: Turn rows into columns with their respective values
you must do a PIVOT in your table. DECLARE @registros as table ( idRegistro int, Campo varchar(50), Valor varchar(50) ) INSERT INTO @registros VALUES (1, 'Nome', 'Zonaro'); INSERT INTO @registros…
-
0
votes1
answer5972
viewsA: Insert information into a table with Javascript
Rafael, first you will need a template for your data, for your case could be used the following template: { Nome: "", Sobrenome: "", Telefone: "" } the second part would be to define a template and…
javascriptanswered Tobias Mesquita 22,900 -
4
votes2
answers650
viewsA: Convert to jquery
Danilo, first that I reserve the right to disagree that jQuery is more practical than Javascript, if we take into account only modern browsers and excluding the depedencia that some frameworks have…
-
3
votes2
answers1790
viewsA: Data Search with Entity Framework
Jedais, I see no point in trying to compare Raw SQL (form 2) and Linq (Query - form 1, Method - form 2). I would use Raw SQL only in situations where winning a few "ms" results in a big gain, that…
-
9
votes2
answers664
viewsA: How to get the title of an image by Javascript?
you only need to select the image (either by ID or other selector), then access the property title. var outraDiv = document.getElementById("outra-div"); var imagem =…
javascriptanswered Tobias Mesquita 22,900 -
1
votes2
answers95
viewsA: Retrieving a json and turning it into html
Bruno, I believe you’re having recurring doubts about the subject, so let’s take a. note that the JSON you are working on is not unified, some content does not have a Body and some have attachments.…
javascriptanswered Tobias Mesquita 22,900 -
2
votes2
answers78
viewsA: Javascript does not pull results
you even started with the right foot, isolated the method to calculate in a function. However I advise not to declare inline events in HTML itself, preferably use HtmlElement.addEventListener(name,…
javascriptanswered Tobias Mesquita 22,900 -
3
votes2
answers2915
viewsA: How to consume this JSON with Javascript?
Using Javascript only: var url = "https://client-demo-accounts-2.bootstrap.fyre.co/bs3/v3.1/client-demo-accounts-2.fyre.co/379221/MjAxNjAxMjcxMjQyOmRlc2lnbmVyLWFwcC0xNDUzODQwMjgxODk0/init"; var…
-
2
votes1
answer148
viewsA: What is the name of this effect?
you can achieve this effect using different combinations of Transform, Transition and Animation. below follows a complete example: var content = document.getElementById("container"); var content =…
-
1
votes3
answers233
viewsA: Filereader or IE9 alternative
First I’d like to remind you of the greatest achievement in years: Internet Explorer End of Support So why does it support a browser that is no longer supported by the manufacturer? In any case, you…
javascriptanswered Tobias Mesquita 22,900 -
0
votes1
answer154
viewsA: Jquery does not work after using Function . remove();
Thiago, your problem is basically a side effect of bad practice... using selectors as variable. for example, look at the following excerpt: $('#cidadeID2').change(function() { //alert('#cidadeID2');…
jqueryanswered Tobias Mesquita 22,900 -
1
votes3
answers1271
viewsA: Get google search results with Jquery
As you can not use the Google Custom Search as suggested by Sergio, you can risk the Google Web Search API, but remember that this is deprecated since November 2010. In this case, you can load the…
-
2
votes2
answers355
viewsA: Lambda, Where com subconsulta
from what I understand, you want to bring all the customer steps that the latest step has the EP = id (2). In this case, you will need to group by customer, to then make the comparison. var…
-
1
votes2
answers1143
viewsA: Take first and last line element
for your case, you need to pick every 5 elements, not every 4 elements, this way you will also make a selector for the previous element (5n - 1) ul li:nth-of-type(1){color: red;} ul…
-
2
votes2
answers173
viewsA: Strange Comic Book Behavior - Too Many Records
Although I disagree with the explanation about JOINs given by @Diegovaladares, because if you analyze the execution plan when using INNER JOIN and WHERE, you will see that both have the same…
-
0
votes1
answer53
viewsA: Problem in my Jquery code
Igor, try to store the .adm_edit and the .input_edit current in some variable with wider scope. $(document).ready(function(){ (function () { var atual = {}; var inputs = {}; inputs.exitEdit =…
-
2
votes2
answers455
viewsA: Dynamically Loaded Content Handling
At the end of the page loading, the input#P2Telefone is not yet available, it will only be available after the request AJAX. So you have two options, move the $("#P2Telefone").css('width','100%');…
-
2
votes3
answers805
viewsA: Picking text from a particular column with jquery
Paulo, to ensure that your HTML will be valid, I advise you to assign a unique ID for each element of your page, so I advise you to use this cont in your favor, however you can keep all Dropdownlist…
-
3
votes1
answer63
viewsA: How to transform the text of a div into lines with <p>
look, maybe you don’t need to break your div, you can add an image with the ">" as background of p, then seven the line-height, padding-left and the background-size for the same value. #lipsum p…
-
1
votes1
answer1497
viewsA: How to make a menu-div appear when clicked on a button?
look, to make a menu off-canvas, you will need two divs, one for the conteudo that will occupy the whole screen and another for the menu, the menu will be hidden in a non-visible area. To hide the…
-
1
votes1
answer445
viewsA: Pop-up with video for website
Tiago, basically you need to put some element that occupies the whole page, for this you can make use of the position: fixed, width: 100%, height: 100% and z-index: 1003. within this element, you…
-
0
votes2
answers6548
viewsA: Javascript function calling another javascript function inside a while
Nathan, I believe you may be encountering some problem with the scope of the variables, between trying to make the following changes. try to use some more structured way to group your elemethos,…
-
1
votes1
answer150
viewsA: animate progress bar
if you need to manually modify the bar value, then I advise you to use transition instead of animation: var valor = document.querySelector(".valor"); window.setTimeout(function () {…
-
1
votes3
answers10597
viewsA: Add element at the beginning of a key object/value
you can create a Class to encapsulate your list, then create a method set on the prototype of this Class reordering Keys whenever a new element is inserted. var Lista = function (obj) { //inserindo…
-
5
votes3
answers2757
viewsA: Detect if a particular page opens within an IFRAME
you can try to access window.frameElement, case frameElement is null, it’s because you’re not inside a iFrame.
-
4
votes3
answers280
viewsA: How to mount SELECT?
The consultation proposed by the Roma follows an alternative. The query below will not work on MySQL, but is valid in PostgreSQL, Oracle and SQL Server. WITH CTE_PRODUTO AS ( SELECT ROW_NUMBER()…
-
2
votes3
answers818
viewsA: How to configure a dynamic dimension div delimited by other div’s?
You can use flexbox body, html { position: relative; display: flex; /* repare aqui */ flex-direction: column; /* repare aqui */ width: 100%; height: 100%; margin: 0px; padding: 0px; } header, footer…
-
1
votes2
answers42
viewsA: How to do with objects on a page at a certain width to group vertically?
you can use a media-query @media only screen and (max-device-width: 480px) { .col{ width: 100%; } }
-
4
votes1
answer1038
viewsA: How to solve "Access-Control-Allow-Origin" problem
This API has as parameter the return type, to work with CORS and JSON, you must specify formato=jsonp in the request URL. Otherwise, we have other problems, the first is the synchronous sending of…
javascriptanswered Tobias Mesquita 22,900 -
6
votes1
answer360
viewsQ: C# Parallel.Foreach Javascript equivalent
I’m trying to write methods with behavior similar to Array.prototype.forEach and the Array.prototype.map, but using multiple threads. In the case of Array.prototype.parallelMap, I did the following:…
-
5
votes6
answers8595
viewsA: javascript loop with Sleep
you can combine a closure with a setInterval, so that it works in a similar way to a while (function () { var indice = 0; var limite = 10; var interval = setInterval(function (){ console.log('valor…
javascriptanswered Tobias Mesquita 22,900 -
4
votes2
answers388
viewsA: Will Websql really be discontinued?
I see you make a little confusion between IndexedDB and WebSQL, your question implies that you are using the IndexedDB. But unfortunately your problem is with Webview, only in the Version 4.4 to…