in reply to Using CGI (Perl) and javascript at the same time

Why would you want to do such a thing?

I once had a discussion about JavaScript being evil or not. I thought it isn't. I also don't think knives are evil. One could do practical and useful things with them. One could also do bad things with it.

Since I had that particular discussion, I've seen more and more bad uses for JavaScript (and JScript, of course). This is just one more. Why do you want to know the name of my computer? If I'd want you to know, I'd tell you.
The kind of script you are trying to write here, is the kind of script that sets people up against a certain language. Well, you won't set me up against JavaScript, for I have seen its beauty. But more and more, I am thinking about disabling JS in my browser.

Many of you will most probably disagree with this reply because you think I don't offer any help to krt6 and maybe because you think I'm a little too offensive. That's ok. But let me tell you that I helped krt6 and many others in my way. Not by showing him the path to the solution of his problem, but by disagreeing with any kind of unwanted "spyware". Yes, one could say it's possible to disable JavaScript and yes, one could say that *will* prevent this kind of spyware. But no, dear readers, not everyone knows his computer inside out and no, dear readers, not everyone knows how HTML works, how JavaScript works, how CGI works or even how exactly Internet works. Shouldn't we, the ones with knowledge, protect such people instead of just getting as much information as possible about them? It's not our right to abuse their ignorance.

Thank you.

--MUBA.

Update: slightly altered the message.
  • Comment on Re: Using CGI (Perl) and javascript at the same time

Replies are listed 'Best First'.
Re: Re: Using CGI (Perl) and javascript at the same time
by krt6 (Novice) on Apr 07, 2004 at 13:02 UTC
    Thank you all for the quick responses.

    Let me provide a little bit more information:

    This is a cgi page on my company's intranet. Therefore, the only machines that will access this page will be inside our firewall. Computers on the outside will not play any role. I am running reports with Tivoli on the machines who visit this page. This will help our support team make sure that those machines are a part of our Tivoli infrastructure.

    This cgi page runs a report with Tivoli and does an inventory of a machine's software and submits it back to my AIX server. This page will also display the results. All of this is done by using the backticks to make a `UNIX` call, which is why I can't do this locally on the machine with a windows perl script. (hmmmmm, just thinking a little bit here--- Is it possible to have two perl scripts, one on the UNIX box and one on the Windows box and have the windows script submit its results to the UNIX script?)

    The command in Tivoli needs the machines name or ip address. I know how to get the page to work by creating a form and manually entering the computername into a textbox and submitting, but there are ethical issues on why I cnnot do this.
      You might try installing PerlScript (a VBScript and JScript-like client side language) on the client? Check ActiveState.