Posts by Fernando Medeiros • 1,382 points
34 posts
-
5
votes1
answer4599
viewsA: Put a div behind the other
add a z-index value to your footer larger than the body that is going over it. This rule defines in which position of the Z axis your element will be, the file with the highest value will always be…
-
1
votes6
answers22035
viewsA: Compute the rest of a decimal division in Javascript
Convert decimal to int by multiplying by 100 before module operation and then dividing by 100 again.
-
1
votes1
answer154
viewsQ: Mysql with Entity framework Code First ID skipping 10
I’m setting up a Mysql in the Azure for an application I’m working on, however while saving my records to identity column is increasing by 10 by 10. This would be an Entity adjustable setting or an…
-
5
votes2
answers48118
viewsA: Load a tab into a div
You can use the ajax post/get, put the URL of your action/page, its parameters if applicable and set the Success Function of the method, in case it takes what was returned and plays inside the div…
-
1
votes2
answers3983
viewsA: How to disable form field using Jquery
You can put in the Success Function of your ajax $('#idCampo').prop('readonly', true);
-
0
votes3
answers166
viewsA: Fix name in search field
I’m not able to open the page here where I work, but if the tag is in this template: <input type="text" name="algumName" value="COLOQUE AQUI O NOME DO TIME PADRAO"/> Doing this, initially the…
-
2
votes1
answer308
viewsA: How to use Html.Beginform with Javascript/Ajax
To achieve this use the event submit() jquery. $('#IdParaOSeuForm').submit(function(e){ e.preventDefault(); //evita o evento default do submit $.post( '@Url.Action("Relatorio", "Apontamento")',…
-
3
votes2
answers233
viewsA: Javascript Date
If I got it right you want to transform from format UNIX TimeStamp to a display format and then be able to convert back to what it was. Solution - Momentjs Use the method moment() var data =…
-
1
votes4
answers419
viewsA: Function Javascript does not work
As I said in the other answer, your error happens, because in your element there is no display attribute defined. getElementById(div).style.display == "none" What this line of code means: "Compare…
javascriptanswered Fernando Medeiros 1,382 -
0
votes2
answers85
viewsA: Help with Bootstrap
Modal Bootstrap Events can be triggered via Jquery; $('#idModal').modal('toggle'); $('#idModal').modal('show'); $('#idModal').modal('hide'); In your case I believe it would look like this: function…
-
1
votes1
answer95
viewsA: Help with Javascript code
What I suggest you do: Modify the part where the string concatenation occurs to the parameter, because it is very difficult to exist any element with such an extensive id var prefixo =…
javascriptanswered Fernando Medeiros 1,382 -
12
votes1
answer27217
viewsA: Rounding in C
The library (Math.h) until 2010 did not implement the function round() by nature, there were only two functions that did this through mathematical concepts. floor() Implements the floor concept.…
canswered Fernando Medeiros 1,382 -
22
votes2
answers5412
viewsA: What is Lazy Loading and Eager Loading?
Eager Loading It is the Load where all related classes are loaded in the same query. The ORM, usually through Joins, will bring all related entities. Example of use You have an entity List, where…
-
0
votes1
answer94
viewsQ: Populate Validationsummary with Data Annotations errors in Submit by AJAX
I defined several Dataannotations for the model which the instancia form. When the Form Ubmit is not by AJAX everything works as it should, ie the Validationsummary is filled with the ErrorMessage…
-
1
votes2
answers74
viewsA: Site does not load in full
Probably some file present locally in your test environment does not exist or is not accessible on your server. Follow a print of the error displayed on the console of your website. Fix this…
htmlanswered Fernando Medeiros 1,382 -
3
votes3
answers496
viewsA: Mysql Friendly URL
First, what you say is to show the ID, actually it is not so, your url represents a file on your server, and the ID represents a parameter passed to that page. When you press ENTER in your browser…
phpanswered Fernando Medeiros 1,382 -
2
votes2
answers2245
viewsA: How to capture Alert message using web browser controler?
To get the message you will have to perform the following procedures: 1- Insert a script tag into the head of your webbrowser containing a new function implementation window.alert, this…
-
7
votes1
answer2810
viewsA: How to use multiple conditions within an if
Logical operators evaluate the Booleans returned in predicates, they must be used between two expressions (which result in a Boolean), or Booleans themselves (true or false) You’re wrong in this…
-
3
votes1
answer306
viewsA: Detect Adblock in user’s browser and show message
There are several ways to try to verify the use of Adblock, here are some: $(document).ready(function(){ DetectarAdBlockUser(); }); function DetectarAdBlockUser() { if…
javascriptanswered Fernando Medeiros 1,382 -
2
votes2
answers2375
viewsA: Pass form values to Ajax
You can use the $('SeletorParaOSeuForm').serialize() Jquery to easily receive information from your form. Example $.ajax({ url: url + "/login/ajaxLogin", type: 'POST', data:…
-
3
votes1
answer433
viewsA: Show div only after passing a second section
First step Know your item’s bottom position relative to the top of the page: //retorna o offset da parte de cima do elemento em relação ao topo $('#district').offset().top; //retorna a altura do seu…
-
1
votes1
answer283
viewsA: Jquery: Mask does not erase
The mask string must be in the following format, in case it is a number it must be used the number 9 as representation, its error is in using the number 1. $("#DataTermino").mask('99/99/9999');…
-
2
votes4
answers9996
viewsA: Modal Bootstrap on Modal by JS
I went through the same problem, you must keep information of how many modals are open, if a new one is open it must have a z-index higher than what is already, to always appear in front, for that…
-
2
votes3
answers761
viewsA: Form.serialize() does not work
You should capture the Submit event from your form instead of clicking the button $("#formDialogOrdemServicoBuscaTopo").submit(function(e){ e.preventDefault(); var dataSerialize =…
-
1
votes1
answer134
viewsA: Problems with html formatting
Place the property in your CSS display : block; or directly in your html tag <div style="display:block"/> //sua imagem </div> It will make you achieve the desired result…
-
1
votes1
answer209
viewsA: Checkbox checked according to string
Since you are getElementById and you are not iterating over the various checkbox what happens is that the checkbox will always have the value equal to the last element of the Checkados vector of…
-
1
votes2
answers139
viewsA: Bootstrap 3 Datetimepicker
The show event is shot as follows: $("#txtDataHora_01").datepicker('show');
-
2
votes2
answers189
viewsQ: Passing by reference in C
In the case of language C, when we want to pass a variable by reference we need to pass its address to the function, I have a question in this case. Take the example: int main(){ int *a; *a = 5;…
-
0
votes2
answers2820
viewsA: What’s the difference between @import of css and html Link?
There are no differences basically, the link is the html method of calling a stylesheet, the @import the one of css. However, the browser interprets them in a different way, where the link has an…
-
3
votes2
answers1084
viewsA: Error 500 in ajax request with Asp.net mvc
I went through something like this the other day, Use the Fiddler program to verify which requests and which replies you are sending. Regarding the error may be linked to the return type, try the…
-
1
votes2
answers511
viewsA: Validation via Javascript
It is possible to use the Success function to solve both problems, in the Action "Registration" you must keep the current code, adding only a validation to check if the user is already registered…
-
3
votes1
answer1027
viewsA: Code First Migrations Mysql - Specify the '-Verbose' flag to view the SQL statements being Applied to the target database
This is a standard message stating that by adding the Verbose flag you will see which SQL queries are running on the applied Migration, if you only received this message you can rest assured that no…
-
0
votes1
answer569
viewsQ: Multiple modal bootstrap always returning the same content
I’m developing an Asp.net mvc application, on one of the pages of the site I call several bootstrap modals over each other, however, when you already have an open modal the new appears with the same…
-
8
votes1
answer1767
viewsQ: How to download automatically on a site that calls Javascript?
I need to make a program that downloads Pdfs from various websites daily and automatically. It is very easy to perform this operation using the C#Webclient command, however, on certain websites it…