Running Perl Scripts

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hal Vaughan

    #1

    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
  • Randy Webb

    #2
    Re: Running Perl Scripts

    Hal Vaughan wrote:[color=blue]
    > 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?
    >[/color]

    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

    Comment

    • Brian Genisio

      #3
      Re: Running Perl Scripts

      Randy Webb wrote:
      [color=blue]
      > Hal Vaughan wrote:
      >[color=green]
      >> 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?
      >>[/color]
      >
      > 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.
      >[/color]

      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

      Comment

      • Randy Webb

        #4
        Re: Running Perl Scripts

        Brian Genisio wrote:
        [color=blue]
        > Randy Webb wrote:
        >[color=green]
        >> Hal Vaughan wrote:
        >>[color=darkred]
        >>> 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?
        >>>[/color]
        >>
        >> 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.
        >>[/color]
        >
        > 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.[/color]

        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

        Comment

        • Martin Honnen

          #5
          Re: Running Perl Scripts



          Hal Vaughan wrote:
          [color=blue]
          > 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?[/color]

          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/

          Comment

          • Hal Vaughan

            #6
            Re: Running Perl Scripts

            Martin Honnen wrote:
            [color=blue]
            >
            >
            > Hal Vaughan wrote:
            >[color=green]
            >> 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?[/color]
            >
            > Let your Perl script return the HTTP response code 204 and the browser
            > shouldn't change anything, no need for scripting.
            >[/color]

            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

            Comment

            Working...