PDA

View Full Version : PerlScript & JScript Integration


Guardian23
09-13-2002, 05:20 PM
Is it possible to access Perl Scalars and Arrays with JScript in the
same page?

All that I can do is access variables of the window. object, and they
can't be modified. I thought of using setAttribute, because it's the
only thing that seems to work for things like innerText and certain
other non-Lvalues.

But is there some sort of Global Model(?not a proper term?) that
can allow access to Scalars or Arrays? Because it seems like a pain
to set a hidden span's internal code just to integrate the variables.
Although I noticed that the functions are global, because
a call to the JS UD-function "function()", can be called in Perl, and
the Perl UD-function "&function2()" can be called at will using JS
Syntax with onclick or an ordinary function call.

Alas, the same is not true for Perl UD scalar $var1.
$var1 ne $window->var1
and $window->var1 = $var1 returns "cannot define a non-Lvalue"

Guardian

PS. I'm not sure if this goes in Perl or JS Programming, sorry if this
is a mispost.

beetle
09-13-2002, 07:27 PM
Well, it's quite likely that what you need to do can be done completely in JS. Are you sure that you need to use PerlScript?

Guardian23
09-14-2002, 02:47 PM
It's not actually necessary, but what I'm trying to do is create a
template for some of my XML and HTML files, but doing that in
Perl is annoying, since the command prompt is exactly like that
of the original MS-DOS, not allowing bactrack.
 So obviusly, the answer was a custom form in HTML, but
seemingly, PerlScript is the fastest way to manipulate text base
files browserwise, and I can't find much information on ActiveX
objects in JS, so I don't know if it's possible to manipulate files
that way...

Guardian23