470,613 Members | 2,448 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,613 developers. It's quick & easy.

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 1671
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Sandman | last post: by
42 posts views Thread by Fred Ma | last post: by
2 posts views Thread by noone | last post: by
1 post views Thread by Al Belden | last post: by
12 posts views Thread by rurpy | last post: by
4 posts views Thread by Patricia Mindanao | last post: by
4 posts views Thread by billb | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.