Posts by Leandro Angelo • 9,330 points
440 posts
- 
		3 votes1 answer23 viewsA: I cannot put menu above textHow are you working with position:absolute and is not declaring the z-index, the browser will stack your Ivs as they are declared in your html. Add the attribute z-index: 2000; in the css of… 
- 
		1 votes1 answer86 viewsA: Isolate and update only one DivInstead of doing Reload, assign src to the images you’ve already uploaded. function SetarImagem(imgConvertida) { var vData = { img2: imgConvertida }; $.post("/MeusDados/SetarImagem", { 'img':… 
- 
		4 votes1 answer1480 viewsA: Check the predominant color in the imageAlthough it is not possible to demonstrate how it works here in the snippet, you can identify the predominant color of an image using the library Color Thief. It is important that the image to be… 
- 
		1 votes2 answers134 viewsA: removeClass does not workYou did not include your html, but to what all indicates the disabled referred is not a style class but an attribute of the element. $('#main-form').on(function () { simCode = $('#main-form… 
- 
		1 votes1 answer528 viewsA: How to remove the title bar from the Visualstudio C# Xamarin android appAccording to the answer to the same question in SO EN NavigationPage.SetHasNavigationBar(this, false); Source: https://stackoverflow.com/questions/20480724/xamarin-remove-app-title… 
- 
		1 votes1 answer48 viewsA: How to give a POST on the page with the UPLOAD property without going into looping?As stated in the comments, this happens because by clicking the button bntCarregar you are invoking an event in the backend, which in turn is triggered by a post on the client side, the famous… 
- 
		1 votes1 answer174 viewsA: ASP.NET Entityfraord - Grid with PaginationThe problem is in the sequence as you are running, when declaring the var lista ending with a OrderBy() you’re returning a IOrderdEnumerable<>, that does not implement the ICollection required… 
- 
		0 votes1 answer102 viewsA: Event click javascript does not call the action - Asp.net CoreThe problem is in your note in the button click event $("btnNovo").click(function (eve) { $("#modal-content").load("situacoes-gerenciamento/cadastrar-novo"); }); Here you are indicating only the… 
- 
		1 votes1 answer36 viewsA: js loop does not show next itemThe detail is in your index validation, because if there is no next one but the current item is the last you just remove the class ativa without adding any. And was also calling the function… javascriptanswered Leandro Angelo 9,330
- 
		3 votes1 answer953 viewsA: List existing folders/subfolders and files in a specific root folderYes, it is possible, but it is not the most recommended. You can simply test if it already exists and pass this return to the user. Another common practice is to use guids to create folders and save… 
- 
		2 votes2 answers8087 viewsA: Consuming API with javascript/jqueryYou are capturing the value of the field at the wrong time when it has not yet been filled Move the assignment of var valor1 = document.getElementById("teste").value; to the scope of your button… 
- 
		0 votes3 answers277 viewsA: Overwrite native HTML scrollIt turns out in Alert, you’re not superimposing the scroll you’re taking the focus off the body’s scope. Although I don’t recommend it, you can assign an event behavior to the scroll event by… javascriptanswered Leandro Angelo 9,330
- 
		0 votes1 answer32 viewsA: Why does my Endereco model return null after the postback?The construction of the View to edit lists and collections is somewhat peculiar and has some pitfalls. This is due to the attributes name and id of the elements vs as MVC will bind with its… 
- 
		0 votes1 answer55 viewsA: Send button from a formYou can add a hash to your action and an anchor in your html, so when reloading the page after the post, the scroll will be done to until the form again. In your case as the target of the action is… 
- 
		2 votes2 answers89 viewsA: doubts to style an active linkYou can do via Jquery, as in the example below. $(document).ready(function(){ $('.navbar a').on('click',function(){ $('.navbar a').removeClass('active'); $(this).toggleClass('active'); }); });… 
- 
		4 votes1 answer70 viewsA: Using a button or dropdown to separate the query by alphabet letter?In fact what you need is a filter, would not give up paging because of this, imagine that you have 150 people with the name starting with the letter "A". In the example below I assigned the… 
- 
		0 votes2 answers36 viewsA: Delete information from textbox when there is ReloadHow did you report that you are not using the PostBack for no operation, you can turn off the Viewstate. In the page declaration on your .aspx add the attribute EnableViewState="false". <%@ Page… 
- 
		6 votes2 answers1801 viewsA: Async/Await with threads (C# 7.2)The sum in the NotParalel() is precisely why you are waiting for an execution to finish and then run the next one and finally return, on account of the await. public static async Task NotParallel()… 
- 
		0 votes1 answer301 viewsA: Close mobile menu by clicking scrollAdd the following script block so that by clicking on a menu link it performs the collapse $('.navbar-nav a').on('click', function(){ $('.collapse').toggleClass('in'); });… htmlanswered Leandro Angelo 9,330
- 
		1 votes1 answer436 viewsA: Validate fields with OnclientclickOne of the problems is that in your javascript you are instantiating the ddlProcesso and then and then tetando check another object that has not been declared the ddlEmpresa function… 
- 
		0 votes1 answer27 viewsA: Functions of Javascript/2Follow an example, just use your return prompt() and assign to the contents of your div. function showMessage() { var msg = prompt('Digita Mensagem');… javascriptanswered Leandro Angelo 9,330
- 
		1 votes1 answer46 viewsA: Live video streaming multiuserQuite simplistically, you’ll need to route the requests in your external ip to the camera’s local address. If it provides http delivery, it should already have a "native" server and player. Another… 
- 
		1 votes1 answer139 viewsA: Insertion of HTML elements within another HTML Generated with Jquery in the same functionTurns out you’re creating elements with id duplicated in your DOM which is nothing recommended, add a unique identifier to your dynamic elements. function listaItensPorIdExecCadeia(objIdExecCadeia){… 
- 
		0 votes3 answers1074 viewsA: Get object content without knowing the attribute nameThrough string atributo = "modelo" string conteudo = meuCarro.GetType().GetProperty(atributo).GetValue(meuCarro); c#answered Leandro Angelo 9,330
- 
		0 votes1 answer1173 viewsA: Display success message after registration is completed via AJAXYou can use the event beforeSend to display your progress div and hide it in success. Instead of the .css({display: 'block');you could simply use the method show(); $.ajax({ type: "POST", url:… 
- 
		1 votes1 answer110 viewsA: Request sent more than once when selecting a form fieldYou are doing the bind on the wrong event, the way you set it, every time the user clicks on #cmbContrato you trigger the ajax request. And as noted by @Barbetta, you’re always adding elements to… 
- 
		3 votes2 answers82 viewsA: Working with vectors / matricesNote that your vector variable is not a string array, but an array of objects And to recover the value you need to treat it properly. Or actually use a matrix through the declaration string[][].… 
- 
		3 votes2 answers2173 viewsA: Pick data-attribute from a selected option by clicking on buttonYou need to add the :selected to identify the selected option and you can use the method data() to return the attribute value, if you want to recover by attr() would need to enter the full name, in… 
- 
		2 votes1 answer499 viewsA: How to recover the URL from previous ASP pageVia Javascript you can use: var paginaAnterior = document.referrer; If you choose to capture the ASP Classic paginaAnterior = Request.ServerVariables ("HTTP_REFERER")… 
- 
		1 votes3 answers253 viewsA: Search for word variationsYou can add a helper class to these treatments by adding these methods to the string type and adding the methods to the treatments you want, removing all the characters you find pertinent. Take the… 
- 
		1 votes2 answers239 viewsA: Group items within a foreachWith a simple structure you and using LINQ (System.Linq) you can solve this problem as follows: Create a structure to store your groups public class NaturezaOperacao { public int NatOper { get; set;… c#answered Leandro Angelo 9,330
- 
		1 votes3 answers861 viewsA: String reading Json format for c#You can use a dynamic as you already know the structure and what you want to find becomes much simpler without needing to map the whole structure of an object to get only the value of some… 
- 
		4 votes1 answer916 viewsA: How to perform a function after ajax Success?After the success: you have the complete: but it is fired both in the case of success and in the case of error, so you need to validate the xhr.status to check whether the request was successfully… 
- 
		14 votes1 answer12121 viewsA: Postasync Json C#To reproduce the presented model, you need to create an object that has an attribute called input and that receives an array or list of Tickets. Then you need to serialize this object in a json and… 
- 
		0 votes1 answer48 viewsA: Syntax . cshtml - DevexpressLucas, read the documentation of the component you are implementing. In your view: @Html.Partial("RichEditPartial") Create Partial View for the component: @Html.DevExpress().RichEdit(settings =>… 
- 
		0 votes1 answer280 viewsA: jQuery with Blur effect does not workIf you’re not seeing the animation you’re probably using a different browser than the filters you’re specifying for the css, don’t forget to add the rest to ensure the expected presentation in other… 
- 
		1 votes1 answer56 viewsA: Bi-Directional Communication - How to get status?You are calling an asynchronous method, waiting 5 seconds and then trying to read an attribute that may not be reflecting your real state. And you’re also not capturing the error while trying to… 
- 
		0 votes4 answers2906 viewsA: How to get the highest value in an array with Javascript?Because your logic presents several points of failure. Basically in your script you try to compare the current item with the next one. a = array[i]; b = array[i+1]; Whereas in the attribution of b,… javascriptanswered Leandro Angelo 9,330
- 
		3 votes1 answer63 viewsA: How to pass input data to javascript and then present itFollow a simple example using javascript only. var mostrarNome = function (){ var exibicao = document.getElementById("exibir"); var nome = document.getElementById("nome").value; exibicao.innerText =… 
- 
		0 votes1 answer20 viewsA: Javascript Collapse ProblemAn alternative is to add a Boolean parameter to your hide_all(jumpFirst) function and skip the Hide of the first element if it is true. Already getelementsbytagname error did not occur here in… 
- 
		0 votes1 answer35 viewsA: Beginform with several button in one formThis is because you set their type to Submit change to button, for those you don’t want to do Submit for form and control their behavior via javascript. <button type="button" id="btnSubmit"… asp.net-mvcanswered Leandro Angelo 9,330
- 
		0 votes1 answer126 viewsA: Convert extracted binary from . getUserMedia() to . mp4What you can do is use a compression codec like x264 to reduce the size of the converted file, after that if the result is not yet what you want. All that remains is to reduce the bitrate and or… 
- 
		1 votes2 answers93 viewsA: How do I prevent the file I created in txt to record two equal C#?If your goal is to avoid duplicating a record you should first read the file and check if it no longer has that record before writing the new one string path =… c#answered Leandro Angelo 9,330
- 
		1 votes2 answers75 viewsA: Error when doing sum inside foreachAnother option is not to use the foreach() and yes the method Sum() totdesp = valordespesas.Sum(); c#answered Leandro Angelo 9,330
- 
		1 votes3 answers111 viewsA: How to do a function to calculate and alert the number of lamps needed to illuminate a particular roomFollowing an example, it would still be necessary to put the treatments for validation of inputs, but as the question should be to validate the logic... this example meets the requirements. function… 
- 
		0 votes1 answer46 viewsA: Class structure forOnce the element <erro> is composed of several <codigo> and <descricao> Your mapping should include lists or arrays for them: <erro> <codigo>B0000</codigo>… 
- 
		1 votes1 answer81 viewsA: Carousel element change captureyou do not need the setIterval just make the bind with the slid event. Once you are picking up the item information with the class .active this information is always available for the current item.… 
- 
		1 votes1 answer28 viewsA: Is there any way to extend a main file into Webforms?What you are looking for is called Masterpage, in it are the components and visual elements that are shared by all pages of your application Webforms, below is an example. Site.master. <%@ Master… 
- 
		1 votes1 answer57 viewsA: Function javascript work with dynamically generated elementsWhen you bind to $('.rating1').likeDislike(.... it is applied only to elements that already exist in the DOM, you need to perform the same operation for those that are created dynamically after… javascriptanswered Leandro Angelo 9,330
- 
		0 votes2 answers168 viewsA: PROBLEM WITH AJAX JSONYour mistake is here $.getJSON('img_trocar.php') var obj = JSON.parse(dado) You make a request to receive json, but do nothing with it, then you call parse waiting dado that doesn’t exist…