Posts by Tobias Mesquita • 22,900 points
750 posts
-
5
votes1
answer356
viewsA: HTML version of IE
Since you want IE8, IE10 and IE11 to maintain their normal behavior, I believe the best thing to do is to place a conditional on IE9 <!--[if IE 9]> <meta http-equiv="X-UA-Compatible"…
-
0
votes3
answers6557
viewsA: How to search for words with javascript?
@Lucianozancan, based on his last example, I believe that Responsetext is a serialized XML document in an unconventional way. In this case the interresante is to convert the Responsetext to an XML…
javascriptanswered Tobias Mesquita 22,900 -
1
votes2
answers3063
viewsA: Pass values from a form to a method in the Model and return the result to another textbox in the Form
Here follows an alternative Gypsy response (which by the way is quite complete): Here I will be using an AJAX request to perform the sum and return the value. Model using System; using…
-
3
votes3
answers1813
viewsA: (Javascript-jQuery) Variables within variables giving "Undefined"
Thiago, I believe you are having some problem understanding the scope of a variable and the unchanging nature of a string. when you are concatenating strings, you are not joining the reference of…
-
3
votes1
answer872
viewsA: Search JSON format information from a url
First welcome to Stackoverflow. As I see you have no experience with Javascript, I would like to touch on certain aspects. The first is that this type of page(content) is usually used to allow…
-
0
votes3
answers1028
viewsA: File download does not work
@Warlock, with the knowledge I have about its application (adquerido of other questions from you), I believe that its problem is not in the download itself, but in the mechanics of the UpdatePanel.…
-
6
votes6
answers8412
viewsA: Function that enumerates letters of the alphabet
An alternative is to analyze the charCode of each character. var getNumeros = function (palavra) { var numeros = []; for (var i = 0; i < palavra.length; ++i) { //Latin - minusculo var numero =…
-
2
votes1
answer560
viewsA: Break div when content exceeds maximum size
@Rod, I performed an implementation here, in case it will create the other pages according to the need: var paginaAtual = document.querySelector(".pagina"); var book =…
-
1
votes3
answers4129
viewsA: Directory problems
Kleyton, this system variable will take the directory where the application is running, so it will display a slightly different behavior in the release version than in debug. In your case, I see…
-
19
votes2
answers16045
viewsA: Foreach or lambda in lists
@pnet, LINQ tends to be slower than a conventional loop, for the simple reason that Linux adds an overhead to its code. This overhead is basically the conversion of your LINQ in a traditional loop.…
-
3
votes1
answer3988
viewsA: How to take the value of a div and show in javascript?
value property refers to inputs and selects. in this case you need to get the internal HTML of the DIV. .getElementById('valor').innerHTML
-
6
votes1
answer147
viewsA: Why does the binary conversion of SQL Server not return a binary value?
@dellasavia, 1111011 is only 1 byte, in case an N'123' is a 3 character nvarchar. Each character of an nvarchar occupies 2 bytes, totaling 6 bytes. 0x310032003300 can be read as follows in HEX: HEX:…
-
4
votes1
answer920
viewsA: How to improve the performance of this SQL query?
@chavesfop, try to move the subquery that is in your Where to the joins. SELECT CC.ID FROM CONTRATO CC INNER JOIN CLIENTE C ON C.ID = CC.ID_CLIENTE LEFT JOIN DEPENDENTE D ON D.ID_CLIENTE = C.ID LEFT…
-
2
votes1
answer218
viewsA: Problems adding script dynamically with Javascript
When you add a script to a page, you should expect it to be loaded before you can use it. In this way, you should define a function that will be called only after the script load has been completed.…
-
1
votes1
answer567
viewsA: How to load plugins already configured after page load by ajax
As pointed out by the bfavaretto, the Mutations Events, such as the DOMNodeInserted have been marked as obsolete, so browsers may no longer support them. On the other hand, we could use Mutations…
-
1
votes2
answers699
viewsA: How to send a SOAP in C?
@Jorgeb, to connect a C/C++ application to a Webservice, you need to use WWSAPI. For more information you can look at the following website:…
-
1
votes2
answers110
viewsA: Artist cover update generates many requests
@Lucas, unfortunately you cannot use CORS to check if the image URL exists. In this case you will need to replace the following snippet of your code: capa_nova = data.responseData.results[0].url; if…
javascriptanswered Tobias Mesquita 22,900 -
5
votes3
answers425
viewsA: Javascript : Give . Hide on everything that is open
@William, for this you need a common element among all mirror. For example look at the HTML below: HTML <div id="mirror30" data-mirror class="hidden" ></div> <div id="mirror31"…
jqueryanswered Tobias Mesquita 22,900 -
3
votes3
answers707
viewsA: Sum table values
So let’s assume the following model: public class Pessoa { public string Nome { get; set; } public double Contribuinte { get; set; } public double SubTotal { get; set; } } And we have the following…
-
5
votes2
answers139
viewsQ: Use date or class to query DOM elements
Here I am needing a little help to get a broader view on this subject. As a rule I usually avoid using class to query elements in HTML, I end up using a custom data property. in many cases I end up…
-
2
votes4
answers3898
viewsA: How to open and hide fields from a form by checking on button radio?
Here follows a more Generic implementation. May use n input:radio to display n countenances. //consultando os radio responsaveis por exibir os conteudos. var tabs =…
-
3
votes3
answers3850
viewsA: Elements with Css cut corners
As you don’t want a rounded edge, I believe you won’t be able to use a border-Radius. To simulate the "cut" in the div, you will need a possible internal div in the "cut" position. then you will…
-
0
votes2
answers1374
viewsA: Count number of checkbox selected
@Warlock, I really don’t understand why you need to count the Checkboxes every Callback. If you need to do something that takes into account the selected Checkboxes, the logical thing would be that…
-
0
votes1
answer134
viewsA: Function does not continue after second run in the same class
I managed to solve your problem: When finishing the animation of the spin you weren’t completely destroying it, so this unwanted behavior happened. since the plugin does not provide a Destroy…
-
0
votes1
answer796
viewsA: Show a <select> by clicking on a particular <option>
As clarified by the author of the question, the important thing here is to obtain the Dice of the selected option. follows a new example: //pre-consulta para obter os selects #master e #details var…
javascriptanswered Tobias Mesquita 22,900 -
4
votes3
answers995
viewsA: Disable all Dropdownlist Options s less what is selected
Although @Diegozanardo’s reply is correct, I’d like to add a full example. In this case I used the selector :not(:selected) to filter the options. var btTravar = $("#btTravar"); var slMarcas =…
-
2
votes3
answers242
viewsA: Show list of 6 in 6 items
Since you mentioned you’ll only have one UL with N (several) LI, then you will have to have some mechanism to control which LI will be visible. The example below will use the property data-page with…
jqueryanswered Tobias Mesquita 22,900 -
2
votes3
answers291
viewsA: positioning of float elements without spacing
I can not work with a grid system where the sum of all width exceeds 100%, in the case of your example the total of div gives 200%. In this case I would use nested div div.column { width:50%;…
-
0
votes1
answer136
viewsA: How do I send the input response to soapUI
I believe you already have a functional Mockservice in your SOAPUI and know which address and endpoint you need to access. in this case you can use a jQuery plugin to work with SOAP messages: jQuery…
-
4
votes3
answers4590
viewsA: How to create dropdownlist Razor in . net mvc via ajax?
as suggested by Jhonathan you can make an AJAX request, follow below the important passages to do this: Controller [HttpPost] public JsonResult GetSubValor(Int32 valor) { return…
-
3
votes1
answer1168
viewsA: Fill table with BD data
I believe that you should be allowing yourself to refer to the variables at random. Then I re-read the statement of your variables, might solve your problem codArtigo = function () { var $linhas =…
-
1
votes1
answer109
viewsA: Variable is always with value, when it should be null at certain times
The command rptAprovaDocumento.Items[i].FindControl("chkTornarObrigatorio") as CheckBox simply returns the CheckBox chkTornarObrigatorio associated with the current item. Like all the RepeaterItem…
c#answered Tobias Mesquita 22,900 -
7
votes2
answers4875
viewsA: Create Editable Table
As I said above, you can do this using jsViews, as in the example below: For this you will need an Entity that will serve as a model, in the following case: { Codigo: "", Designacao: "", Quantidade:…
-
3
votes1
answer537
viewsA: How to work with associative table with additional attributes in REST?
I believe that you can simplify the returns of methods 1 and 2, returning only a list instead of a complex object, I believe this would simplify your API (GET)…
-
3
votes2
answers122
viewsA: Adapt script that uses checkbox for radio
@Jessi, I ran some tests here, it seemed to be working normal: As I don’t know what values you are assigning type and type, I put fixed values. So? This is the expected behavior? var checkbox =…
-
1
votes2
answers52
viewsA: List group only that contain items
If you are using EF5 or higher, I believe the best solution involves a Contains. var gruposID = db.Itens.Select(item => item.GrupoId).Distinct().ToList(); var listaGrupos = db.Grupos.Where(grupo…
-
2
votes1
answer453
viewsA: Modal popup does not work
In this case, the modal must be inside the Panel. Since you have a Scriptmanager on the page, I advise you to use Updatepanel to decrease the data flow in the Application. Note that the example…
-
1
votes2
answers239
viewsA: Sending problem in Webservice call(SOAP_ACTION, envelope)
as pointed out by @Feedproject, you cannot call Webservice at Thread Leading. But if for some reason you don’t want to use AsyncTask, such as having a greater control over the Threads, you can use…
-
3
votes3
answers2928
viewsA: How to replace in html string only in texts within (between) tags?
You can do an in-depth search and check the Node type: var content = document.getElementById("content"); var txtFind = document.getElementById("txtFind"); var txtReplace =…
-
1
votes4
answers1380
viewsA: Warning box after click div
I’d like to put my 2 cents here. As I see you are still starting with Avascript, jQuery, etc... I would like to present you a Frontend Framework that in my opinion (2 cents) is better than…
-
1
votes3
answers11724
viewsA: How do I create a floating html window?
If you don’t want or can use a plugin as suggested by @Sergio, you can do the following: var btAbrirModal = $("#btAbrirModal"); var modal = $("#modal"); var modalClose = $("#modal .modal-close");…
-
1
votes5
answers6761
viewsA: How to create composite key with Entity Framework 6
Just complementing the reply of @Ciganomorrisonmendez, because I believe it is the best answer. You can maintain your structure and add a Foreignkey to an inherited property, however for this you…
-
0
votes1
answer193
viewsA: Ajax request with flashing setInterval
@John, I performed some tests here, the problem occurred when the innerHTML was replaced by a long text. To get around this situation, I did the following. I created a div calling for container I…
-
0
votes4
answers164
viewsA: Father class with the same responsibility of the daughter class
you can put a little logic in get of Valor of Item. In the example below, if the object Item, own some SubItem, the property Valor of Item will return the sum of properties Valor of their SubItem…
-
6
votes2
answers938
viewsA: CSS or Jquery for animation
The lightest is an animation using only CSS, but in some cases it is necessary to use Javascript to control the behavior of Animation and this adds an additional cost in the execution of its…
-
61
votes3
answers8159
viewsQ: When to use Entity Framework with Repository Pattern?
Lately I have several examples of Repository Pattern homemade on questions about Entity Framework. But the Entity Framework already implements a Repository Pattern, which in this case is the Unit Of…
-
0
votes3
answers137
viewsA: Doubt in research
@Denilsoncarlos, the problem is in your query, but specifically in the condition LIKE. You must concatenate the % with the variable, as in the example below. DECLARE @tabela as table( guid…
-
2
votes1
answer301
viewsA: How to get value from a Radiobutton field in JS?
The problem here is in the MVC syntax. To overwrite the attribute name html, you need to use the @Name (with N maisculo). Dotnetfiddle Model using System; using…
-
1
votes1
answer298
viewsA: Scroll per section with side Gui
The first thing you need to do is make body fullscreen, so we can use heigth: 100% body { position: fixed; top: 0px; right: 0px; bottom: 0px; left: 0px; margin: 0px; padding: 0px; } Within this…
-
1
votes1
answer1453
viewsA: List directories and subdirectories
To traverse the tree to the leaves, you need to use recursion: public void CriarTreeView() { var diretorios = DiretorioController.GetInstance().GetSubDiretorio(""); foreach (var diretorio in…