Questions tagged as 'javascript'

1
answer

Javascript function that generates html colors according to value

I need to create a Javascript function that takes an int and returns an html color code. The rule is: The smaller the number "cooler" is the color generated (light blue, for example) and the larger the warmer. However, the values must follow a g...
asked by 10.11.2015 / 00:24
2
answers

Loop in function by calling itself

I need to create a purposeful loop to check if a variable has reached the desired value, the idea is to create a function that inside it will have a if , which verifies if cont == 4 in case 4 is the number of iterations previous to...
asked by 01.10.2015 / 16:21
4
answers

foreach php inside script

Could you please let me know if it is wrong to use this code like this: <script type="text/javascript"> <?php foreach ($lista as $key => $value) { $id_indicador = $lista[$key]['id']; ?> var id_indicador = <?php echo $i...
asked by 11.11.2015 / 16:34
2
answers

How to add R7 portal bar in site?

I need to implement that R7 portal bar at the top of a website, does anyone know of any way to do that? Is there any way to make this bar adaptable to any screen size? This is the toolbar:     
asked by 19.03.2014 / 22:06
3
answers

Javascript function does not respect loop conditions

Good afternoon, I'm new here and I'm using Mozilla Firefox JavaScript Scratchpad to run Javascript tags. It will really suit my needs, however the while loop condition of the while loop is not working (for also did not work). Also, the varia...
asked by 23.10.2015 / 20:25
2
answers

Difficulty with the "find and replace" function in javascript for a browser application

I'm trying to develop an extension for Chrome, and I'm still getting started, and right from the start I'm already stuck. I know very little of javascript but I try to do what I can by searching. This extension is inspired by FoxReplace from...
asked by 10.04.2014 / 10:36
3
answers

Changing LABEL value by JQuery or Javascript does not work in ASP.NET

I use this JS function in ASP.net: function habilitado(){ var b = document.getElementById('<%= Label4.ClientID %>').value = "Habilitado"; } I call it that in codebehind. The label value should be changed, but this does not happen....
asked by 15.03.2014 / 21:45
3
answers

Create an array with objects in Javascript

I have defined the object, and array in scope. //Define o array que deve ser preenchido com os objetos var itensList = []; //Define os argumentos do objeto var oItem = { Codig: 0, Desc: "", Unid: "KG", Quant: 0, Custo: 0,...
asked by 09.04.2014 / 15:18
1
answer

Make condition if with split

I need to make a condition, where I check if a input has entered the character . . For this I am doing a if where I make split with value of my input. if (idCliente.split('.')[1].length > 0) If input...
asked by 11.04.2014 / 11:33
2
answers

Change background of a class dynamically

I have a site where content creation is dynamic and the user can choose the color to be used in components, but I need it to see the update in real time, so I need the class to be changed with the required value and that the added elements also...
asked by 08.05.2014 / 00:01