Posts by Aline • 1,703 points
78 posts
-
1
votes2
answers1697
viewsA: Date range C#
I imagine that you are validating the dates of entry into the client, still, being a conditional information of the functionality, should validate again in the server. I haven’t tested it…
-
3
votes2
answers263
viewsA: How to select the whole object, Lambda C#
You can write select at the end of the expression, as LINQ mentioned: query.Join(this.systemDbContext.PrinterCounter, printer => printer.PrinterId, pc => pc.PrinterId, (printer, pc) => new…
-
0
votes0
answers19
viewsQ: Get route.name through Httpcontextbase
I have mapped routes in my application: context.MapRoute("Home.Index", "home/{action}/{parameter}", new { controller = "Home", action = "Index", parameter = UrlParameter.Optional }); I wrote an…
-
1
votes2
answers46
viewsA: Script via Link requires double click the first time it is requested
You can, and in my opinion: should, add all scripts within a single read function of the ready document. I don’t see the need to listen to several similar events or search for the code in various…
-
0
votes1
answer324
views -
1
votes1
answer70
viewsA: import a mongodb tuple
When you have a csv, the line break represents the value for the previous line key, so: coordinates {"latitude" :-9.262.132.106.882.630, "longitude" : -3.793.454.647.064.200} It means that your…
-
0
votes1
answer202
viewsA: Missing list items with jquery or javascript
Assuming your HTML is something similar to: <input type="text" placeholder="Procurando por algo?" id="mapa_filter" /> <ul class="autocomplete_mapa_filter"></ul> Your js would be:…
-
1
votes1
answer1212
viewsA: ASP C# Bootstrap - Open Masterpage modal
I added the code the way you posted it: modal opening/closing code in masterPage and webform codebehind made the call: ScriptManager.RegisterStartupScript(this, this.GetType(), "script",…
-
1
votes1
answer188
viewsA: How to clone a dynamically created element with jquery?
Well, if I was going to need a constant html and change only a few values, I would use a "template" or static html. Something like: html = '<li>'; html += '<input class="w3-input w3-left"…
-
5
votes2
answers35
viewsA: Jquery ignoring houses on the right
You can convert to Number both values: var qtde_trans = Number($(this).val()); //VALOR DIGITADO var qtde = Number($(this).closest('tr').find('[name="qtde[]"]').val()); And then make your parole: if…
-
4
votes3
answers9259
viewsA: Time difference between two dates with Javascript?
You can test by minutes or seconds of hours: function verificarDiferencaHorario(inicialMin, finalMin) { var totalMin = Number(finalMin - inicialMin); console.log(Math.trunc(totalMin / 60).toString()…
-
0
votes2
answers39
viewsA: Skipping line before time
As you have been told in the comments, the first iteration is already 0, so your line break. If you start at 1 and replace the < 100 to: <= 100, the counter will work. The code I tested:…
-
2
votes2
answers3552
viewsA: Add values to a C#list
You could have an object: Expiration, which would have all the properties that Voce needs. Something like: public class Expiracao(){ public string Name {get; set;} public string Address {get; set;}…
-
1
votes1
answer400
viewsA: Create a javascript link or banner using another javascript
You will need the js function that adds the element or html you need: <script> function adicionarLink(){ document.getElementById("div-inserir-link").innerHTML = "<a…
-
0
votes2
answers860
viewsA: Local and Session Storage for Login and Registration
I changed a few things in your HTML. I removed the onblur, which I didn’t understand because you were using it, so if you really need to, you should add it back. And also the email ID was wrong,…
-
0
votes1
answer501
viewsA: Pass parameters in jquery . on
You can declare your listener with on and get a date attribute with your parameter, for example: I changed your button a little to pass the date attribute and add the class:…
-
2
votes1
answer1589
viewsA: Print only part of an HTML page
var conteudo = document.getElementById('barcode').innerHTML; var telaImpressao = window.open('about:blank'); telaImpressao.document.write(conteudo); telaImpressao.window.print();…
-
12
votes5
answers1273
viewsA: Why Nan Nan == 0?
In the case of arithmetic operators, Nan is not computable and any value with one of these operators used in partnership with Nan will return Nan. Since Nan is not a number. NaN + 1 = NaN NaN / 2 =…
javascriptanswered Aline 1,703 -
1
votes2
answers801
viewsA: Update Textbox without Postback
Since you do not want the postback of the page to update the #txtTroco, a suggestion is to do this process in the client, with js. You will need to change your html code so that the element Ids do…
-
1
votes1
answer100
viewsA: How to change and maintain the mapping of classes and properties using ADO.net
In the context of your application, the class where you configure the EF and define the Dbset, can also customize other information. You can override the method: onModelCreating using Fluent API and…
-
0
votes2
answers1654
viewsA: Fill input with Function javascript result
I suggest removing the direct declared event return test in the element to make it better for you to view: <input ID="txCNPJ_cad_emp" id="cnpj" name="cnpj" class="form-control"…
javascriptanswered Aline 1,703 -
0
votes1
answer361
viewsA: How do I manipulate data from a select created from jquery
I don’t know the sequence of the HTML additions on your page, but assuming you defined the events and then called: Addform, which added the elements, the change event will not be triggered, because…
-
2
votes1
answer431
viewsA: Animate a side menu in WPF
Dockpanel does not have the Zindex property, which would allow you to define the relevance index (I couldn’t think of another way to explain) of the component in the layout, just like the web.…
-
-1
votes2
answers174
viewsA: CSS - Tbody and TR with different measurements
In his element: <tr>, add style: line-height: 4px; npx, actually set the size you want. You can also change the padding and margin of tr. And if you are using some style ready, like:…
-
-1
votes1
answer877
viewsA: How to thumbnail a PDF?
If you really want a Thumb of a document . pdf, you can convert this doc to image and then generate Thumb. It has several libs that do this. I’ve worked with Imagemagick who does this, and it’s…
-
2
votes2
answers36
viewsA: Search WEB date only
public static string GetNistTime() { var myHttpWebRequest = (HttpWebRequest)WebRequest.Create("http://www.microsoft.com"); var response = myHttpWebRequest.GetResponse(); string todaysDates =…
-
2
votes1
answer1100
viewsA: Column-specific selection in an HTML table in JS
The way you are demonstrating this table today, you will only be able to recover the value of the price field by the element index <td> in <tr> and this will only work, taking into…
-
3
votes2
answers239
viewsA: Changing Cell Color according to IF condition in C# WPF source code
If you know the ratings, I took that test: public DataGridCell GetCell(DataGridCellInfo cellInfo) { var cellContent = cellInfo.Column.GetCellContent(cellInfo.Item); if (cellContent != null) return…
-
0
votes1
answer230
viewsA: Handle datatable return data
The resolution of the problem: My filter object, received by the action is: public Class Filter(){ public ObjModel objModel {get; set;} public ObjDataTable objDataTable {get; set;} } Thus, I thought…
-
0
votes1
answer230
viewsQ: Handle datatable return data
My problem: I need to submit an object to my action. The component that manages the tables today, adopted here in the company, is the datatable. In order to send this parameter, I had to change the…
-
1
votes2
answers1164
viewsA: How to know when an item is at the top of the page
You need to check the position of the scroll in each action - scrolling. So: $(window).scroll(function () { var divAtiva; $.each($("#conteudo .div-interna"), function (indice, obj) { if (!divAtiva…
-
3
votes4
answers1488
viewsA: How to do <li><div class="class" onclick="window.Location='link';"></div> open in new tab?
You can use a tag to link to urls. To open in new tab: <a target="_blank" href="http://google.com">Google</a> But if for some reason you really need it that way, you can use: <li>…
-
2
votes1
answer478
viewsQ: Static properties and memory release
I’m having some doubts regarding the release of resources for cases where my modifiers are static. My project is unit test and I’m using Selenium for the first time. public class LoginTest : Base {…
-
0
votes1
answer631
viewsA: jquery.load does not load js or css
Since your slider is being mounted on the home, add the slider JS to the home file. What should happen is that in the slider plugin, the properties and actions are being added predicting that the…
-
1
votes2
answers434
viewsA: Input Submit does not call Actionresult
There are some ways to do this. I changed some things in HTML: @using (Html.BeginForm(null, null, FormMethod.Post, new { id = "formFila" })) { @Html.Partial("~/Views/Shared/ViewPartial.cshtml",…
-
0
votes2
answers174
viewsA: How to classify letters and numbers in Javascript and Lodash?
I do not know if it is possible with common methods of ordering, on account of the natural ordering of the elements. If you take a test, how: var lista = ['1', '4', 'C', '6', '2', 'A']; function…
javascriptanswered Aline 1,703 -
1
votes1
answer324
viewsA: Am I using (learned) the MVC standard in the right way?
According to the MVC architecture, your model would be correct. You could search for design patterns to get other views about code organization and the project itself. Separate your model properties…
-
0
votes2
answers1669
viewsA: Convert string to JSON
Assuming you have an array of integers then: var lValoresDoSelect = [1,2,3,4,5]; var lIds = new Array(); $.each(lValoresDoSelect, function(index, obj){ lIds.push({ id: obj }); }); Assuming you will…
-
0
votes1
answer84
viewsA: ajax without query permission
Remove Contenttype from the request and add: crossDomain: true, dataType: 'jsonp', Follows: $.ajax({ type: "GET", url:…
-
1
votes2
answers47
viewsA: Error to popular array with Double
More details are missing in the question, but I believe that even if you have inserted this array, there should only be the same instance and no index to reference: In case of list, you can use:…
-
0
votes1
answer22
viewsA: result.lenght ajax error with wcf
Since your result object is not a list, according to your comment - it should be added to the post, remove the for and continue with the code exactly as it is: var obj =…
-
1
votes2
answers497
viewsA: Show and search fields and according to selected checkbox field?
<script src="https://code.jquery.com/jquery-3.0.0.js"></script> <div id="geral"> <div class="form-group" style="margin: 0 auto;" id="divAreaServico"> <label for="segmento"…
-
1
votes1
answer348
viewsA: Creation of tables through div
$(document).ready(function () { $(".column").css("width", $("#geral").outerWidth() / $(".content-body>.rowCustom:first>div").length); }); If using jquery, don’t forget the lib reference. CSS:…
-
0
votes4
answers188
viewsA: Increment in Javascript function
I would do something like: var inicio = 1, maximo = 5; function addTableRow(){ if (inicio <= maximo) { var newRow = $("<tr>"); var cols = ""; cols += '<td> </td>'; cols…
javascriptanswered Aline 1,703 -
1
votes2
answers1124
viewsA: I’m not able to leave the images in the same size using bootstrap
.img-Responsive Makes an image Responsive (will Scale Nicely to the Parent element) https://www.w3schools.com/bootstrap/bootstrap_ref_css_images.asp This does not mean that the images will be the…
-
3
votes1
answer882
viewsA: update input with jQuery
$(document).ready(function () { $('tbody').sortable({ axis: 'y', containment: 'parent', animation: 200, stop: function(){ $.each($(".tab_dados tbody>tr"), function(indice, obj){…
-
1
votes1
answer179
viewsA: Problems When passing data via ajax
Replace the value of Inp: <input type="text" name="urltxt" id="urltxt" class="form-control text-center" data-url="?folder=usuarios/&file=ins_usuarios_usuarios&ext=php"…
-
3
votes2
answers1143
viewsA: Create Javascript mask using jQuery
You need to define your masks and then apply them to those who matter. We assume: <input type="text" id="cpf"/> Starting from the pre-presumed that you have already added jquery and…
-
5
votes1
answer285
viewsA: Get mouse position in percentage by clicking on image
I auditioned for div: <div style="width:500px; height:400px; background-color:black" id="div"></div> Jquery $("#div").click(function (e) { var dataDiv = $("#div").offset(); var clickX =…
-
1
votes1
answer24
viewsA: How to select records in a table using as reference the datetime present?
select id, programa, descricao, data_hora from wp_programacao where data_hora >= now() order by data_hora asc limit 5;