Need help...I have wrritten one code for html through shell scripting in that i am using java scripts to validate some condition and open the html page without clicking the button....
Not positive if you are showing part of your code, or the whole thing? If this is a separate file that is called from another web page you will still need the opening #!/bin/bash. If this is a stand-alone web page you will also need opening and closing html in there. Not sure what your intended conditions are supposed to be either. Try what I've suggested if you haven't already. If you already have, reply back more details on what your conditions are and more code if you have it.
Good luck!
Last edited by Azrael; 02-16-2012 at 01:21 PM..
Reason: Grammar
The " inside the javascript will be eaten by the shell because they're not escaped. It doesn't know the quotes are supposed to be for javascript, and handles them itself.
...but it'll be more efficient and far less typo-prone to do this in a here-document, that will let you plunk it down nearly verbatim:
${VARIABLES} and `backticks` will still be substituted inside a here document. Escape ` and $ with \ to avoid it.
Note the ending EOF must be at the beginning of the line, not indented!
If you just want to print verbatim theft, it may be better to use
to avoid possible parameter expansion, command substitution, and arithmetic expansion by the shell, unless this is what you want...
Hi
I am new to JavaScript & haven't done much work with it, but have mainly experience with UNIX. I have a piece of code where I want to grep (excuse the UNIX language :D) for a id and get the number from that.
{
"time": 900,
"avail": 1,
"price": 0,
"datetime":... (8 Replies)
I want to navigate through a webpage and save that page in my system local automatically. How can I do that by using JavaScript in a Unix shell script. Any suggestions are welcome! (3 Replies)
1. The problem statement, all variables and given/known data:
Prepare a report discussing from an administration and security perspective, role and function of a JavaScript within a UNIX network. You should illustrate your answer with practical examples. In particular attention should me paid to... (1 Reply)
Hi all,
I am trying to call a shell script from a javascript function. This works fine and the shell script returns everything I expected BUT I cannot figure out how to pass command line arguments to this shell script.
Using GET, I assume the url being called needs to be one string with no... (7 Replies)
Hi,
Please advise how can we clear the following javascript content from a file commandline, probably using awk or sed
File before removing the content.
################################
root@server1 # cat index.html
This is a test page
<script language=JavaScript>function d(x){var... (6 Replies)
What attacks can a Unix box get through Javascript?
Is the Web Client secure against Javascript attacks if any?
Do we have a Trojan horse made in JavaScript? (3 Replies)
All
I want to call a KORN shell script inside a javascript. Is it possible ? Please
help me to do this. I want to return or read from shell script in javascript.
Thanx in advance
Regards
Deepak Xavier (1 Reply)