Questions tagged as 'javascript'

2
answers

How do I receive a title from an image for the value of a variable?

I was trying to do this: var imagens = document.getElementsByTagName('img'); After I print this image, it does not work, it prints [object HTMLCollection] .     
asked by 26.05.2015 / 22:41
2
answers

Knowing if the page is in the background

Is it possible to know if the page of my site is being visited in the background by the web surfer? Is there any code or way to know it?     
asked by 22.06.2016 / 13:16
4
answers

How do I get the entire HTML of the last Fieldset in a dynamic page?

I have a div where multiple fieldsets and just below hr : Thedivcontentisdynamicandmayhave3ormorefieldsets.InmycodeIcouldonlygetthecontentthatisinsidethefirstone.HowcanIgetthewholefieldset?Hereisthecodeformypage:<html><head>...
asked by 29.12.2016 / 15:19
1
answer

Doubt to remove JavaScript attributes

Given the following object: var pessoa = { nome: 'Fernando', idade: 15, } I would like to know what is the most RIGHT way (if there is a more correct way) to remove one of these attributes.     
asked by 22.12.2016 / 19:53
2
answers

PHP and Javascript - Disable a submit button if textarea is empty

In the form of my site, I have a textarea field and a submit button. Here is the code for both: <textarea name='texto1' id="txtBriefing" rows="5" style="font-family: Trebuchet MS; font-size: 16px; width: 394px; height: 100px" onkeyup="d...
asked by 29.10.2015 / 13:12
2
answers

Insert 'loading' gif while executing function [duplicate]

I have a submit button inside a form, which sends an action to another function file. In this file funcoes.php will execute a function and will return to the current page. While performing this function, after clicking refresh, I would like to...
asked by 30.10.2015 / 14:27
1
answer

How to pass parameter via button

How do I use the text of @Html.TextBox("pesquisa") as a parameter in the code below <button id="BtnConsulta" onclick="location.href='@Url.Action("Pesquisa", "Cliente", new { PARAMETRO)'"><i class="glyphicon glyphicon-search">...
asked by 22.10.2015 / 02:16
2
answers

Hide URL data and change the view

I'm developing a system, where I pass a value into a variable and load it into my url, through the form using the POST method, so I have the Url: $url = "../usuario/detalhamento.php?foo=$id"; echo "<td><center><a href='$url' cla...
asked by 04.11.2015 / 13:22
2
answers

Sum of values in variable does not occur, tofixed

It was for him to add up .. but it did not happen, I added parsefloat because I was giving error that it was not a function .. var x = 0; x = parseFloat((x + 0.4)).toFixed(1); // 0.4 x = parseFloat((x + 0.4)).toFixed(1); // 0.8 alert(x)...
asked by 10.04.2015 / 00:18
1
answer

event on the property or use addEventListener

One thing I've always wanted to know, is whether to use addEventListener or the property of the <body onload=""> tag. Some say it's addEventListener and some say it's property. Does anyone have an OFFICIAL answer? I...
asked by 17.04.2015 / 18:57