object persistence

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Richard Trahan

    object persistence

    Well, almost. I want to send a large amount of plain text generated by
    my js script to a Perl program on a server.

    I can't find any straightforward way to call a Perl script from js, but
    a brute force way might be to have an onsubmit function run when the
    user clicks a button, have it create a textarea node, write everything
    to it, return true from the function which will let the href on the
    submit button invoke the .pl file, which of course will get all textarea
    text. Or something like that.

    If I have to do the above, and if it causes a big flash, is it possible
    to write to an iconfied window and have it do the same thing?

    I was hoping for something simpler.

    Thanks in advance for any suggestions.



  • Colin McKinnon

    #2
    Re: (not really) object persistence

    Richard Trahan wrote:
    [color=blue]
    > Well, almost. I want to send a large amount of plain text generated by
    > my js script to a Perl program on a server.
    >
    > I can't find any straightforward way to call a Perl script from js, but
    > a brute force way might be to have an onsubmit function run when the[/color]

    onsubmit is used to verify the data and decide whether to proceed to submit
    - it does not submit the form (you need form.submit() for that).
    [color=blue]
    >
    > If I have to do the above, and if it causes a big flash, is it possible
    > to write to an iconfied window and have it do the same thing?
    >[/color]

    Wouldn't it be simpler to put the iframe in a hidden div? BTW although you
    can't GET "a large amount of plain text", you can point the iframe to a
    form with a POST method, copy the data into the form and submit it.
    Javascript in the 'action' url can update values in the parent of the
    iframe.

    There is a javascript/PHP RPC package out there (which does the above more
    or less).

    HTH

    C.

    Comment

    Working...