Questions tagged as 'javascript'

2
answers

How to identify when someone is uploading on the page?

I need to refresh the page every 5 minutes, but I have a form for uploading files on the page and are usually large files. Is there any way to identify when someone is uploading a file with Javascript? Javascript code: setTimeout('locati...
asked by 16.10.2014 / 17:03
2
answers

How to force the '.on (' input ') method via script?

I guess my method: $(document).on("input", "#textbox", function(){ alert("oi"); }); What script can I force to call the alert ("hi")? I tried several and nothing: $("input#textbox").val("1"); $("#textbox").val("1").on("input"); $("...
asked by 03.09.2014 / 19:46
4
answers

Mark checkbox if user type in input text in a table

I need when the user types in an input text, the checkbox of the respective table line should be checked, and if the user leaves the input text again in blank, the checkbox unchecks. Here is the code: <table class="table table-str...
asked by 27.08.2014 / 18:45
1
answer

Keep line in SVG always connecting two objects

I have two circle objects, which I can move with the mouse. I wanted a line between the two circles, which always moves if one, the line is always glued. The code I have to move the objects: var dragged = null; //L'élément en cours d...
asked by 17.11.2014 / 17:05
2
answers

Scrollbar Customization

Today, can we only use CSS to change the scroll bar customization of a DIV? If so, how can I do it? Otherwise what is the best script and how to use it?     
asked by 01.10.2015 / 22:38
2
answers

Clear Input When Choosing Another Option

What I want to do The guy has on the form the option to register individual or legal entity. I want it when it clicks on the person's radio, it clears the input from legal person, and vice versa. What I did I feel like a fool. I made th...
asked by 21.10.2015 / 18:02
2
answers

Popular a table with form data in angularjs

I am learning angular.js and am having difficulty with the following code var myapp = angular.module("myapp", []) myapp.controller('controller', function reset($scope){ $scope.reset = function(){ $scope.nome = " "; $scope.nota1 = "...
asked by 13.10.2015 / 15:23
3
answers

Ask if the user really wants to leave the page?

I have a page where any task occurs, only it needs to be finalized, or every process will be lost. I would like to show an alert, like Facebook and other websites show, asking the user if they want to leave this page or stay in it.     
asked by 16.09.2015 / 20:29
2
answers

Return N elements from a list in jQuery

I have a list of elements, say a list of rows in a table: $('#minha_tabela tr'); Is there a selector, method or overload in jQuery so I can return more than one line passing multiple indexes? Something like, $('#minha_tabela tr').get(0...
asked by 21.11.2014 / 05:21
4
answers

Two-dimensional Array

I'd like to loop through a two-dimensional array according to the code: var cadeiras = [[true, false, true, true, true, false, false, true, true, true, false, false], [true, false, true, true, true, false, false, true, true, tr...
asked by 20.10.2015 / 19:30