07-06-2009
Not in any legally and ethically clean way. You Perl script runs on the server, so it has no way of influencing the client, except through HTML and JavaScript. Those two run on the client (=browser), but only if it's allowed.
Similarly, you can't write a CGI program to enable JavaScript on the client if it's deactivated there.
10 More Discussions You Might Find Interesting
1. Windows & DOS: Issues & Discussions
Hello,
We someone help me resolve this problem. I have window 2000 professional, windows 98 and Unixware 7.0.1 on the network. I was able to establish connection with all. However, l was unable to ping window 98 from window 2000 professional. I was able to ping the window 2000 from the window... (10 Replies)
Discussion started by: kayode
10 Replies
2. UNIX for Advanced & Expert Users
I'd like to be able to run a java program that utilizes the Swing libraries from an X Terminal interface to our UNIX box at work. At the command-line, if I type java SomeProgram where SomeProgram creates a JFrame, it causes havoc with any open xterm. All xterm windows lose their borders, title... (3 Replies)
Discussion started by: nwboy74
3 Replies
3. Shell Programming and Scripting
Hi All,
Below I am discussing the problem I am facing while using pattern matching in Unix & Window. Plz hv a look into it.
================
my $s="UPDATE A
SET s="klkkk'
;" ;
if ( $s =~ m/^*UPDATE+/i )
{
print $s;
}
else
{ print "no match";}
===================
Both should... (6 Replies)
Discussion started by: Niroj
6 Replies
4. Red Hat
I am using GUI mode in Linux & face a problem that when ever i double click on any folder it opens in new Window. I want to ask all DP members where is the option to disable this thing..
Means i want when ever i double on folder it should open in the same Window. looking for your help.. (1 Reply)
Discussion started by: salman103
1 Replies
5. AIX
Hi,
I am trying to open a console window through the HMC. When I choose to do this the toolbar at the top left of the HMC screen show 'Open Terminal Window'. However when I click on it I am getting the error -
"The tsak you want to switch to is an applet based task, which dowes not support... (1 Reply)
Discussion started by: jimthompson
1 Replies
6. UNIX for Dummies Questions & Answers
In OSX, I have created some custom... well.. I guess you'd call them Macros?? within the .profile file. Some of these "Macros" are to open specific directories in a Finder window.
Does anyone know what commands need to be used to have these folders open in LIST view, and maybe even be... (1 Reply)
Discussion started by: RiDE
1 Replies
7. Shell Programming and Scripting
i want to write a script that automatically fills in a form and pushes a few buttons. can i do that with bash or something similar? (1 Reply)
Discussion started by: magiling
1 Replies
8. Shell Programming and Scripting
Hello everyone
I don't know if it's the right place to ask, but I will try. I want to use Gtk2 in my Perl chart-drawing script, I found a sample code that could be very useful for me somewhere, but I noticed there is one problem with that - when I draw something, and then scroll the window or... (0 Replies)
Discussion started by: xqwzts
0 Replies
9. Shell Programming and Scripting
Hello All
I am getting an issue which I want to share will all you guys
There is one windiows sercice running on my machine names Network Provisioning Service.
I developed the perl script which do
$service='Network Provisioning Service';
system('net stop $service');
When I manually... (1 Reply)
Discussion started by: adisky123
1 Replies
10. AIX
I would like to know XVFB is open source or not. (0 Replies)
Discussion started by: prathap.g
0 Replies
LEARN ABOUT DEBIAN
javascript::rpc::server::cgi
JavaScript::RPC::Server::CGI(3pm) User Contributed Perl Documentation JavaScript::RPC::Server::CGI(3pm)
NAME
JavaScript::RPC::Server::CGI - Remote procedure calls from JavaScript
SYNOPSIS
package MyJSRPC;
use Carp;
use base qw( JavaScript::RPC::Server::CGI );
sub add {
my $self = shift;
my @args = @_;
unless(
@args == 2 and
$args[ 0 ] =~ /^d+$/ and
$args[ 1 ] =~ /^d+$/
) {
croak( 'inputs must be digits only' );
}
return $args[ 0 ] + $args[ 1 ];
}
sub subtract {
my $self = shift;
my @args = @_;
unless(
@args == 2 and
$args[ 0 ] =~ /^d+$/ and
$args[ 1 ] =~ /^d+$/
) {
croak( 'inputs must be digits only' );
}
return $args[ 0 ] - $args[ 1 ];
}
package main;
use strict;
my $server = MyJSRPC->new;
$server->process;
DESCRIPTION
JavaScript::RPC::Server::CGI is a CGI-based server library for use with Brent Ashley's JavaScript Remote Scripting (JSRS) client library.
It works asynchronously and uses DHTML to deal with the payload.
In order to add your custom meothds, this module should be subclassed.
The most current version (as of the release of this module) of the client library as well as a demo application have been included in this
distribution.
INSTALLATION
To install this module via Module::Build:
perl Build.PL
./Build # or `perl Build`
./Build test # or `perl Build test`
./Build install # or `perl Build install`
To install this module via ExtUtils::MakeMaker:
perl Makefile.PL
make
make test
make install
METHODS
new()
Creates a new instance of the module. No further options are available at this time.
query()
Gets / sets the query object. This has the side effect of extracting the env() data.
get_new_query()
This method generates a new query object. It is used internally by the query() method. This method should only be used if you want to sup-
ply a query object other than the standard CGI.pm object. However, it must be a CGI.pm compatible object. Here's an example using CGI::Sim-
ple.
sub get_new_query {
require CGI::Simple;
my $q = CGI::Simple->new();
return $q;
}
env()
Gets / sets a hash of information related to the currently query. The resulting structure contains four items:
* method - the method called
* params - an array of parameters for the method
* uid - the unique id for this query
* context - the context id
error_message()
Get / sets the error message sent to the client if an error occurred.
process()
Processes the current query and either returns the result from the appropriate method, or an error to the client and returns either true or
false, respectively, to the caller. An error will occur if the method name is blank, or the method has not been defined. This function
takes an optional CGI.pm compatible object as an input.
Your subclass' method will be evaled and will either return an error to the caller if it died, or return a valid result payload on success.
error()
Returns a valid error payload to the client and false to the caller. It will automatically call error_message() for you.
result()
Returns a valid result payload to the client and true to the caller.
SEE ALSO
* http://www.ashleyit.com/rs
AUTHOR
* Brian Cassidy <brian@alternation.net>
COPYRIGHT AND LICENSE
Copyright 2005 by Brian Cassidy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.8.8 2005-10-06 JavaScript::RPC::Server::CGI(3pm)