/    Sign up×
Community /Pin to ProfileBookmark

HTML, Javascript, CGI, Bash script

Hi,
I have created a webpage with form and “input type=range”. Now I want the value of that range (slider) to be assigned with a value which is coming from a config file in the server on the initial load of that html page. For that I have written a bash script to get the value from the config file. Even I have written a cgi script to execute the bash script and print the values in the html page but I want that values to be assigned to the slider value.
Html File

`<form>
Minimum Length<br><input type=”range” id=”Minlen_range” name=”MinlenRange” min=”0″ max=”100″ value=”8″ oninput=”this.form.MinlenInput.value=this.value” />
<input type=”number” id=”Minlen_text” name=”MinlenInput” min=”0″ max=”100″ value=”8″ oninput=”this.form.MinlenRange.value=this.value” />
</form>`

CGI Script

` #!/bin/bash
echo “Content-type: text/html”
echo “”
echo “<html><head><title>Bash as CGI” echo “</title></head><body>”
echo “<h3>Minimum Password Lenght</h3>”
echo “<pre> $(/usr/local/bin/Propertyhandler getConfiguration minlen) </pre>”`

Kindly help.

to post a comment

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogSep 06.2019 — Hmm...haven't done anything with CGI is years. :( Is PHP an option?

Anyway, my first thought is that maybe the CGI script and/or the script it calls do not have read/execute permission for the httpd user or whatever user your web server would try to run them as?
Copy linkTweet thisAlerts:
@charangudduauthorSep 06.2019 — Actually I am using miniserv from webmin as my web server and this only reads .cgi files and my main intention is to get a value from the config file (stored in the server) and set the slider value to that.

I am also using a customized linux operating system where I don't have PHP package installed and it is not allowed to install any more packages.

If you can help me with CGI, it will be good for me.
×

Success!

Help @charanguddu spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.10,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...