I want to create single-user applications to be run on a single PC that you download. The installer would include ActivePerl, should it be necessary. I can't use JavaScript because I want to use DBD::SQLite, plus I don't want to learn a whole new language.

Put it this way - the simple utility apps I want to create and distribute would take between 2-4 days each ... assuming I can use Perl for DBD::SQLite and HTML::Template. The engines for these utilities are very small and easy ... Heck, I've already written most of the engines for two of the utilities in the general course of my work. I don't want to reimplement them, if at all possible, or spend a month learning Tk. But, I don't want to require using a webserver, even one as small as webmin.

As for not needing much to document ... Converting from JScript to PScript is almost impossible for non-trivial cases. Take the following rather simplistic example in JavaScript:

<html> <head> <title>Test</title> <script language="JavaScript"> var button1 = '<input type="button"' + ' name="click1"' + ' value="Button1"' + ' onclick="parent.click1()"' + '>'; var button2 = '<input type="button"' + ' name="click2"' + ' value="Button2"' + ' onclick="parent.click2()"' + '>'; function update () { window.contentFrame.document.open("text/html"); window.contentFrame.document.write( button1 ); window.contentFrame.document.close(); } function click1 () { window.contentFrame.document.open("text/html"); window.contentFrame.document.write( button2 ); window.contentFrame.document.close(); } function click2 () { window.contentFrame.document.open("text/html"); window.contentFrame.document.write( button1 ); window.contentFrame.document.close(); } </script> </head> <frameset onLoad="update()"> <frame src="about:blank" name="contentFrame" noresize> </frameset> </html>

Here's the direct translation (as I understand it) to PerlScript.

<html> <head> <title>Test2</title> <script language="PerlScript"> $button1 = q{ <input type="button" name="click1" value="Button1" onclick="$parent->click1()" language="PerlScript" > }; $button2 = q{ <input type="button" name="click2" value="Button2" onclick="$parent->click2()" language="PerlScript" > }; sub update() { $window->contentFrame->document->open("text/html"); $window->contentFrame->document->write( $button1 ); $window->contentFrame->document->close(); } sub click1 () { $window->contentFrame->document->open("text/html"); $window->contentFrame->document->write( $button2 ); $window->contentFrame->document->close(); } sub click2 () { $window->contentFrame->document->open("text/html"); $window->contentFrame->document->write( $button1 ); $window->contentFrame->document->close(); } </script> </head> <body name="parentFrame" onLoad="update()" language="PerlScript"> <frame src="about:blank" name="contentFrame" noresize> </body> </html>

The JavaScript version works as expected, but the PerlScript one doesn't even run the onLoad handler. What's the difference? What am I missing?

I'm on WinXP Pro, IE 6.0.2x, the latest build of ActivePerl (downloaded within the past week).

Update: Changed to match Erto's statement. It still doesn't work.

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose


In reply to Re: Re: Re: Creating Advanced Client-Side Applications With Perl by dragonchild
in thread Creating Advanced Client-Side Applications With Perl by epoptai

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.