Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have made a simple site that generates random number.
I want to record how many times a specific number comes up.
Is there anyway I can use javascript to write to a Local .txt File on the server?
or do I have to learn PHP?
If you want to keep track of the number of times a random number comes up for a single client/browser, you can use localStorage. If you want to keep track of the number of times the random number occurs across all executions, you'll need some sort of server-side processing.
If you want to avoid any server side processing and this data is critical then you can try GoogleAnalytics code to capture and analyaze the randomly generated data.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
Since a year and a half I am trying to figure out how some websites update their content in real time without AJAX method.
Please see this example website: https://pro.btcturk.com/en/basic/exchange/BTC_TRY
That website is changing many texts within content in different timing.
It means that when the server is updated with new values in the database then the website is listening to database changes and then reflecting/delivering inside content without ajax calls.
Can someone give an example how to achieve such functionality possibly using Javascript or PHP normal hand-code appreciated?
Thank you
You can see the process here:
More information here: Websockets
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
i have three HTML files with java script as well. Now i am interested to create a forth html file to display the result of three different variables declred and used in three different html files.
i tired to used form action to import files but was not able to solve the problem.
Can one one plese suggest the best option to tackle this situation.
You can share data between your pages in many ways, generally either trough your back-end or cookies/localStorage on your front-end. To save a variable you can use localStorage.setItem(key, value) and you can get that variable in another page with var my var = localStorage.getItem(key)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am using a projection mapping programme, with part of the project taking text from a local text file, and inserting it into the programme.
Instead of manually filling this text file with pre-populated content, is it possible to use the Twitter API to feed in tweets to this local text file?
I'm not very familiar using javascript to access twitter's API, but you should be able to achieve that using twit.
Depending on the number of data you're wanting to obtain, the streaming API will be a better option. This will give you a large number of data with less likelihood of reaching a limit.
If you have more question regarding that specific package, you should give it a try (plenty of examples available) and post specific questions with proper tags (i.e. javascript, twit)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
If you can include Javascript so it automatically updates that would be awesome. I want it to gather the amount of space that is being used in directory /wy/ and display on the index.php file and automatically update whenever a file is added to file directory /wy/.
You cant achive this only with javascript as your tag implies. you may need to use any file APIs available. Better ways is to have a Server implementation for this and get the memory details from server using Ajax or any client-server communication techniques.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to create a server where if I pressed "w", a variable (lets say me1) would equal to 1. And if another user (from a different browser and IP) pressed the same key, another variable (lets say other2) would equal to 1.
I don't need everything to be JavaScript (as long as it's easy to understand), I just need the end variables to be JavaScript.
Do your users from different IP's need to be able to talk to each other?
You could use NodeJS as one way to do this. I only recommend Node because its very simple to setup sockets if your answer to my above question is yes.
However both technologies would require a medium to advanced skill set.