Jump to content

HTML slider write to a local file its value

Recommended Posts

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 post
Share on other sites

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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...