Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Running Perl Scripts

Reply
Thread Tools

Running Perl Scripts

 
 
Hal Vaughan
Guest
Posts: n/a
 
      01-22-2004
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
 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      01-22-2004
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

 
Reply With Quote
 
 
 
 
Brian Genisio
Guest
Posts: n/a
 
      01-22-2004
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

 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      01-22-2004
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

 
Reply With Quote
 
Martin Honnen
Guest
Posts: n/a
 
      01-22-2004


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/

 
Reply With Quote
 
Hal Vaughan
Guest
Posts: n/a
 
      01-22-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is required for perl scripts to run correct when launched from rc scripts on HPUX 11? deanjones7@gmail.com Perl Misc 13 09-10-2007 11:58 AM
Running perl scripts on the fly jrosik@gmail.com Perl Misc 6 05-24-2007 09:10 PM
Running several Perl scripts dysgraphia Perl Misc 2 03-17-2007 07:27 AM
Running Perl/CGI scripts in Tomcat server kath Perl Misc 1 02-20-2007 07:28 AM
Finding out if another copy of a CGI Perl scripts is running? Lisa Perl Misc 19 12-19-2004 06:19 PM



Advertisments