Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have made a website where the user can create a design and then fill in a form. All the data is saved as strings. The website is not on a server so the only way to access it is locally, via the source files.
I was wondering; how can i save those strings locally, without a database. Basically; i hae string that need to be saved, even after the page is refreshed. Maybe the strings can be save to a text file or something.
Any ideas? Thanks for the help!
ps, written everything in html, css and javascript.
You can use localStorage, or a browser embedded database, like IndexedDB or WebSQL. These will store data inside your browser, so it wont be shared with anyone.
Maybe you can save it to a .ini file? This is easily done with PHP and the string will be stored locally. This thread can help you further
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 6 years ago.
Improve this question
I would like to create a webpage using JavaScript and HTML that allows for users to insert new information as it becomes available to them and to preform calculations while keeping the given information the same. As well it needs to update the output given to them without requiring the entire page to refresh. A table style format would be preferable, but the easier to code the better. What would be the 'easiest' way to go about this?
Edit:
I apologize for not stating this earlier, I intend to just launch this page on my desktop by using a web browser it is not intended for a server application.
Edit2:
I would like to thank everyone for their help with my request! You have given me great pointers and i will definitely start with these. Thanks again!
What you need is AJAX. It's very useful, because you can do things as:
Update a web page without reloading the page
Request data from a server
Receive data from a server
Send data to a server
You can find some good JavaScript tutorials:
Tutorialspoint
W3 Schools
Mozilla Developer Network (MDN)
LearnToProgram
or a jQuery one here.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
well, I have a comment system that is updated every second with jQuery, but I want to update only if there are changes, that is, only if there are new records in the database. is there a way to do this?
Excuse my English, but I'm using google translator
You may create two function in JS. First function ask php script, which check changes, and, if data changed, run second JS function, which get data and update DOM.
Php is not may send info on loaded http page independently, without request from client side.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 8 years ago.
Improve this question
I am new in web development i want call web service which give response in Json in my HTML page using javascript or Jquery. Also Json parsing in Javascript or Jquery.
Thank you in advance.
I am new in web development : Every Expert was beginner in start.
i want call web service which give response in Json in my HTML page using javascript or Jquery. : most probably ajax is used here
Also Json parsing in Javascript or Jquery. :jQuery has already inbulit methods like parseJson, JSON.parse, JSON.stringify
so there are lot of options, you just need to google it in right way.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
There is an option for disabling right click on the website on the computer but on the mobile I don't know which javascript code I would need.
Images have to be copied from the web server to the client system in order for the client system to display them.
There is no way to stop people from saving them.
There is an option for disabling right click on the website
Not one that can't be trivially bypassed.
There's no way to actually block an image from being copied. If it's being shown to the user, they can obtain it. The resource is already sent to them for render anyways.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Is it possible to append text to an existing textfile using only javaScript?
No. Browser JavaScript does not have access to the local file system for security reasons.
It does not have "arbitrary" access to the file system but it can in fact read/write local files from, eg, the browser cache directory. If you have full access to the client machine you could take advantage of this via a background script to synchronise temporary files to specific locations on the client. There are also techniques using local HTTP server daemons or modified browsers.
Of course if you wanted a "pure" JS solution the obvious question is how such a thing could be done without turning the browser into a premier malware installation system (well, assuming the browser isn't like IE that performs this task already).
As stated, not possible with pure JS. But it is possible if you use XMLHttprequest.
http://www.javascripter.net/faq/reading2.htm