LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-26-2007, 04:47 AM   #1
dhanhar
LQ Newbie
 
Registered: Sep 2007
Posts: 6

Rep: Reputation: 0
Wink JavaScript


hi all,

Thus anybody know how to execute Shell Script from JavaScript in
Redhat .If yes plz give the code for it

Thankx in advance
 
Old 09-26-2007, 05:54 AM   #2
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
What exactly do you want to do?
It might be easier to do it with Java Script.

Please type complete words, and try to avoid unnecessary abbreviations and loose phonetical spelling (thus != does)

Last edited by oskar; 09-26-2007 at 05:56 AM.
 
Old 09-26-2007, 06:19 AM   #3
dhanhar
LQ Newbie
 
Registered: Sep 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by oskar View Post
What exactly do you want to do?
It might be easier to do it with Java Script.

Please type complete words, and try to avoid unnecessary abbreviations and loose phonetical spelling (thus != does)

hi

i have a shell script named start.sh i need to execute this shell script from java Script ,is there any way to do so.
What do u mean it is easier is there a way.

for eg in java we have Runtime.exec();
something like that

Thankx in advance
 
Old 09-26-2007, 06:21 AM   #4
dhanhar
LQ Newbie
 
Registered: Sep 2007
Posts: 6

Original Poster
Rep: Reputation: 0
hi

i have a shell script named start.sh i need to execute this shell script from java Script ,is there any way to do so.
What do u mean it is easier is there a way.

for eg in java we have Runtime.exec();
something like that

Thankx in advance
 
Old 09-26-2007, 06:30 AM   #5
Nick_Battle
Member
 
Registered: Dec 2006
Location: Bracknell, UK
Distribution: SUSE 13.1
Posts: 159

Rep: Reputation: 33
There are some techniques here:
http://www.faqts.com/knowledge_base/.../31646/fid/124

... but it looks like they may be Microsoft specific. The first technique might work more widely (changing document.location.href), though that replaces the current document entirely as I understand it, which may not be what you want.

HTH,
-nick
 
Old 09-26-2007, 06:49 AM   #6
dhanhar
LQ Newbie
 
Registered: Sep 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Thankx , but it does not work in case of mozilla in rehat ..

If there is any other solution plz let me know
 
Old 09-26-2007, 07:25 AM   #7
Nick_Battle
Member
 
Registered: Dec 2006
Location: Bracknell, UK
Distribution: SUSE 13.1
Posts: 159

Rep: Reputation: 33
If the Mozilla platform is your target, rather than a general browser running JavaScript, you can certainly run external programs by calling into the supporting Mozilla framework from JavaScript.

I don't know precisely how to do this (despite having read the book!), but it would help you focus your search. I'd start by looking at one of the Thunderbird or Firefox plugins that you know must launch an external program (like Enigmail, the GPG email plugin).

Cheers,
-nick
 
Old 09-26-2007, 07:28 AM   #8
Nick_Battle
Member
 
Registered: Dec 2006
Location: Bracknell, UK
Distribution: SUSE 13.1
Posts: 159

Rep: Reputation: 33
See http://developer.mozilla.org/en/docs...g_applications

:-)
 
Old 09-28-2007, 02:03 AM   #9
dhanhar
LQ Newbie
 
Registered: Sep 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Thankx Nick the url u gave helped a lot .Now i can execute shell script
in JavaScript
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu Edgy/Firefox 2/Javascript - Firefox closes accessing websites with Javascript Interdictor Ubuntu 8 11-02-2006 11:58 AM
Need help on Javascript jun_tuko Programming 3 01-16-2006 03:45 AM
Javascript help darin3200 General 4 09-03-2005 11:58 PM
Javascript maseby Programming 1 04-09-2004 05:16 PM
javascript in <td>? akaash Programming 0 03-18-2004 12:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration