Questions tagged as 'javascript'

3
answers

Error calling 2 javascript functions at the same time

Hello, I need to call these two separate functions as this is the only code that only one works how do I both work? <script type="text/javascript"> window.onload = function() { if ('a' == 'a') { document...
asked by 16.02.2017 / 17:47
2
answers

Why does the loop not print until the last value was entered as a limit?

I made a code that prints a sequence of numbers, from the number entered to the end, but when I print it the last number is not appearing. Example: first number entered is 3 and second is 7. The sequence would be 3, 4, 5, 6, 7, but 7 does not...
asked by 25.10.2018 / 03:22
3
answers

Show input value when clicking the [duplicate]

How do I show value I typed in input after clicking the button? mine always returns empty: var x = document.getElementById("usuario").value; var usuario = $("#usuario").value; //document.getElementById("user").value; // $("#u...
asked by 04.10.2018 / 16:25
1
answer

Share LocalStorage with browsers

Is there any way to share localstorage with multiple browsers? For example, I set localStorage.setItem("lang", "pt"); in Chrome, however, I would like this value to be available in Firefox and other browsers that support LocalStorage....
asked by 01.09.2017 / 15:41
2
answers

Change the background of the site daily automatically

We are finalizing a system that in the login part has a background with a certain image, but we are trying to make every day a new image appears, the same as in Bing. Can you do this in javascript or jquery? The change of image would be daily an...
asked by 12.09.2017 / 15:50
2
answers

PHP in Browser Write, Read and Update .txt, Locally [closed]

In the client browser! Locally ... How can I create and save to a local .txt file on the client machine the value of two String variables. This script will be logged in and every time the login is done this update will be updated "overwrit...
asked by 08.08.2017 / 19:18
1
answer

Generate file with JS [duplicate]

I have a query and I put a string with the result. Until then everything is ok! What is working for me is to find a good way so that when the query finishes and the string is already set up, a file containing the string is downloaded to the...
asked by 11.06.2018 / 20:07
2
answers

Requesting a .txt file via AJAX

I'm starting in my Javascript studies with interactions with the server, and right away I can not retrieve a text file to be shown via a Javascript alert. From what I've studied, the file must be on a server. In other words, to make a request on...
asked by 22.04.2015 / 23:37
1
answer

How do nodes work in javascript?

In many posts I read that in javascript manipulates element dom, also referred to as "nodes" How is the process of manipulating these nodes? What is the structure involved? What format? Xml style? in tree?     
asked by 20.05.2015 / 19:14
5
answers

Capture text within the option tag

I want to get the text that is inside the <option>TEXTO</option> tag. The situation is as follows: <select xmlns="http://www.w3.org/1999/xhtml" id="page1:form_section:form1:selectListCampus" name="page1:form_section:f...
asked by 10.04.2018 / 22:12