Menu
Hello,
I am creating an archive disk of a site to be used locally on the user’s machine. I have a php search script that uses grep via shell_exec() for searching the site.
I know very little about Javascript, and wonder if Javascript is able to call unix commands. If it seems feasible, I would be amenable to learning Javascript and rewriting the script in Javascript to be used on the client side.
Is the unix call possible?
Allasso
[CODE]function download(data){
window.open("data:x-application/myApp," + escape(data));
}[/CODE]
Hello, rnd,
I just need to figure out how to get the form info (ie, the user inputted search terms) into the javascript. I guess I might need to learn some javascript.
Thanks.[/QUOTE]
[CODE]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>shell open demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<h1>Search for something</h1>
<form>
<input name='search' />
<input value='Search' type='button' onclick="download(this.form.search.value)" />
</form>
<script type='text/javascript'>
function download(data){
window.open("data:x-application/myApp," + escape(data));
}
</script>
</body>
</html>[/CODE]
I cannot get FF to show my shell script as an option for an app to open with. I have tried changing the mime type to application/x-bsh, text/x-script and putting an .sh extension on the script, but to no avail.
[/QUOTE]
I also notice that when data is entered in the form, if the return key is pressed, nothing happens, I only get the option of opening an application if the "search" button is pressed. This could be a problem since folks are used to entering data with the return key.
[/QUOTE]
The other little pesky thing is that the downloads window pops up. Is there a way to stop that from happening?
[/QUOTE]
The script is pretty simple, so maybe I will toy with doing something for windows. Don't they use batch files or something like that that work like shell scripts? Do they have grep and sed and perl with XP or Vista? What about PHP CLI? I could just do the whole thing in a PHP script.
Thanks for your help, RND, that was just the crack I needed.
Allasso[/QUOTE]
[code=html]var searchTable = new Array(
new Array("key words here", "Title Goes Here", "Description goes here.", "key words go here"),
//...
);[/code]
you can load scripts from the local hard drive.
[/QUOTE]
0.1.9 — BETA 5.6