cherault Posted December 11, 2019 Share Posted December 11, 2019 Dear all, In my project, I am using an emebedded webserver LIGHTTPD with PHP. Within the main webpage, I use slider to write its value within a local file on my Linux OS. I wrote the slider like this: <input type="range" name="lightInputName" id="lightInputId" value="1" min="1" max="20" onchange="getvalor(this.value);" oninput="lightOutputId.value = lightInputId.value"> <input size="1" type="text" name="lightOutputName" id="lightOutputId"></input> What I want to do is to know if a javascript and/or PHP script is able to read the value of the slider, and copy it onto a local file. I don't have any idea on how to do this. Many thanks for your guidance. Best regards, Link to comment Share on other sites More sharing options...
dsonesuk Posted December 11, 2019 Share Posted December 11, 2019 Only php can write to file, php and javascript can read the value, javascript directly from the current page (client side), php on submission to server and reloading of page it was sent to. Or through AJAX read by javascript sent values to php page to retrieve values and process. Link to comment Share on other sites More sharing options...
cherault Posted December 16, 2019 Author Share Posted December 16, 2019 Hi Dsonesuk, Thanks for your directive, but I don't know how to do that. Could you please give me a guidance according Javascript/PHP to take the value of the slider, and write it to my local disk ? Thanks Link to comment Share on other sites More sharing options...
dsonesuk Posted December 16, 2019 Share Posted December 16, 2019 Your in luck! w3schools provide tutorials on theses very optionsĀ i suggested. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now