473,786 Members | 2,462 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1758
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
5082
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 to the script under usual SSI (.shtml) containing form data submitted to the page from which the script is executed from. Well, since switching to PHP, I have moved most of my perl scripts to php equivalents, but there are a few perl scripts...
42
4112
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. I'm not interested on which language is better in *general*, just for my purpose. My area of research is in CAD algorithms, and I'm sensing the need to resort to something more expedient than C++, bash scripting, or sed scripting.
2
2205
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 student and all, and I have looked at several bookstores for books about perl and: 1. I don't know what topics I should be looking for to learn the basics of the perl language. 2. Most of the books are too much for me to shell out right now...
1
17721
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 such as: More powerful regular expressions available in perl Ability to print out lines before and after matches (gnu grep supports this but is not availble on our Digital Unix and AIX platforms) Make searches case insensitive by default (yes, I...
12
2360
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
2123
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. I'll try and do as much as possible in pexpect but am sure I'll have do some significant perl. Any suggestions on what is the best way to get upto speed on perl?
4
2958
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 scripts didn't work like intended. They crash because e.g. - syntax errors - wrong or changing pathes - unexpected user input - ...
4
3710
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 functionality of php. The extension uses the '$perl->eval' function. i am kind of stuck with the syntax or how to put the php variable into the perl script. I have a form where the user puts in a grid reference. Then a php script that gets the...
2
3364
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 Options ExecCGI </Directory> And I have:
1
2986
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; # create new CGI object
0
9496
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10164
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9961
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8989
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4066
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.