/    Sign up×
Community /Pin to ProfileBookmark

how to run shell ( on linux) using only html and javascript

i use FC5. I need to run a shell script using a webpage. i cannot use php, etc. i should use only the facilities of a browser ( say firefox). so html & javascript seem to be my only options.

i tried “document.location.href” of javascript but the .sh is only downloading in a “download box” ( firefox). i want it to execute directly. any suggesions ?

the code i used….
<html>
<body>
<script type=”text/javascript”>
var os_str=navigator.platform // to get operating system
os_str2=os_str.toLowerCase() // convert result to lower case

if (os_str2.indexOf(“linux”)!=-1)
{
alert(“you are having linux”)
document.location.href=”http://localhost/java%20script/compare.sh
}
</script>
</body>
</html>

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @rippercad 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.25,
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,
)...