473,386 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Running Perl Scripts

Is there a way to run a Perl script WITHOUT submitting a form? I want to be
able to click an "update" button on a page and have it run a Perl script to
update info, without changing the document in the browser. Is there any
way to do that and leave the current page intact in the browser?

Thanks!

Hal
Jul 20 '05 #1
5 1741
Hal Vaughan wrote:
Is there a way to run a Perl script WITHOUT submitting a form? I want to be
able to click an "update" button on a page and have it run a Perl script to
update info, without changing the document in the browser. Is there any
way to do that and leave the current page intact in the browser?


Change the source of an image to point to your Perl script. When its
requested from the server, it executes the script. Either hide the image
or have the perl script return a harmless image.

--
Randy
Chance Favors The Prepared Mind

Jul 20 '05 #2
Randy Webb wrote:
Hal Vaughan wrote:
Is there a way to run a Perl script WITHOUT submitting a form? I want
to be
able to click an "update" button on a page and have it run a Perl
script to
update info, without changing the document in the browser. Is there any
way to do that and leave the current page intact in the browser?


Change the source of an image to point to your Perl script. When its
requested from the server, it executes the script. Either hide the image
or have the perl script return a harmless image.


That is a cute way to do it... you can hide the image in a div with
visibilty turned off... I like it.

My idea is to hav a small (1x1) IFRAME that changes source.

Brian

Jul 20 '05 #3
Brian Genisio wrote:
Randy Webb wrote:
Hal Vaughan wrote:
Is there a way to run a Perl script WITHOUT submitting a form? I
want to be
able to click an "update" button on a page and have it run a Perl
script to
update info, without changing the document in the browser. Is there any
way to do that and leave the current page intact in the browser?


Change the source of an image to point to your Perl script. When its
requested from the server, it executes the script. Either hide the
image or have the perl script return a harmless image.


That is a cute way to do it... you can hide the image in a div with
visibilty turned off... I like it.

My idea is to hav a small (1x1) IFRAME that changes source.


That works, in browsers that support IFrames (Its the NN4.xx in me
coming out). Hence my suggestion for the images. Image swapping has to
be more widely supported than IFrames.

--
Randy
Chance Favors The Prepared Mind

Jul 20 '05 #4


Hal Vaughan wrote:
Is there a way to run a Perl script WITHOUT submitting a form? I want to be
able to click an "update" button on a page and have it run a Perl script to
update info, without changing the document in the browser. Is there any
way to do that and leave the current page intact in the browser?


Let your Perl script return the HTTP response code 204 and the browser
shouldn't change anything, no need for scripting.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #5
Martin Honnen wrote:


Hal Vaughan wrote:
Is there a way to run a Perl script WITHOUT submitting a form? I want to
be able to click an "update" button on a page and have it run a Perl
script to
update info, without changing the document in the browser. Is there any
way to do that and leave the current page intact in the browser?


Let your Perl script return the HTTP response code 204 and the browser
shouldn't change anything, no need for scripting.


What kind of header goes on that? Do I use the HTML "Content-type:
text/html" header before sending it? (Obviously I've never used error
codes before.)

Hal
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sandman | last post by:
The subject says it all. I am doing a: I have a perl script in which I am using a ReadParse routine that parses the $ENV{'QUERY_STRING'} or $ENV{'CONTENT_LENGTH'} which are two variables passed...
42
by: Fred Ma | last post by:
Hello, This is not a troll posting, and I've refrained from asking because I've seen similar threads get all nitter-nattery. But I really want to make a decision on how best to invest my time....
2
by: noone | last post by:
Hello all, I am absolutely brand new to perl, but I understand that it is a very important aspect of web development to create dynamic web pages. I am kind of short on money, being a college...
1
by: Al Belden | last post by:
Hi all, I've been working on a problem that I thought might be of interest: I'm trying to replace some korn shell scripts that search source code files with perl scripts to gain certain features...
12
by: rurpy | last post by:
Is there an effcient way (more so than cgi) of using Python with Microsoft IIS? Something equivalent to Perl-ISAPI?
8
by: vj | last post by:
I've been given a project which requires writing scripts that need to be run on over 3000 servers. Only about 15% of them have python installed on them. While all/most of them will have perl. ...
4
by: Patricia Mindanao | last post by:
I want to call cgi perl scripts on my web hosters server from my HTML web pages (on the the web hosters server too). It occurs sometimes (especially during development phase) that these cgi-perl...
4
by: billb | last post by:
I installed a perl extension for PHP to use some perl inside my php primarily because I have perl working with oracle and not php and oracle. So I want to use my old perl scripts, and use the...
2
Kelicula
by: Kelicula | last post by:
I have installed Activestate perl with Apache 2.2 and I can't get perl written cgi scripts to run. I have changed the conf file to this <Directory "htdocs/cgi-bin"> SetHandler cgi-script ...
1
by: poolboi | last post by:
hi, i'm trying to test my cgi script a simple one but i don't seem to be able to run this script from cpan #!/perl/bin/perl use strict; $q = new CGI; #...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.