|
Up |
|
|
Author: Gary BruceGary Bruce
Date: Nov 17, 2007 18:06
I'm having problems using JavaScript 1.04. I downloaded, unpacked and made
the tar file from the CPAN site.
The make and installation was somewhat problematic. The module would
not make using the CPAN module. The version downloaded by CPAN was 1.03 not
1.04.
After some investigation into this list I set the JS_INC and JS_LIB
environment variables as directed. I was able to get a clean "perl
Makefile.PL" and "make". "make test" failed 30 out of 32 tests, but the
"make install" seemed to do OK.
I cut and pasted the "99 bottles of beer" sample program from the man page.
Upon running it as "perl javatest.pl" I get the following error:
/libexec/ld-elf.so.1: /usr/local/lib/libnspr4.so.1: Undefined symbol
"pthread_condattr_init"
I'm running on FreeBSD 6.2 on an i386 32 bit platform.
Anyone have any ideas?
Thanks,
Gary
|
|
|
3 Comments |
|
|
Author: Grzegorz Mi¶kiewiczGrzegorz Mi¶kiewicz
Date: Oct 19, 2007 19:49
Hi to all,
I'm trying to validate is string is hex:
function validate_mac (mac) {
var wzor = ^0[xX]([0-9a-fA-F]+)$;
var wynik = mac.match(wzor);
if(wynik == null) return false;
return true;
}
and use this function in this:
function validate_form_komputery ( form )
{
var msg = '';
if((form.ip1.value=='') || (form.ip2.value=='') || (form.ip3.value=='') ||
(form.ip4.value=='')) msg = '* Podany adres IP jest nieprawid
|
|
|
no comments
|
|
|
Author: Jesse ThompsonJesse Thompson
Date: Apr 10, 2007 12:34
Say, would anyone know if it would be possible or easy to serialize a
JavaScript runtime environment or context into a string, to save state
as to all the data in that environment? I don't fully understand how
the "compile" option works so I can't say if that is comparable.
What I am thinking is, my project would like to be able to run scripts
in the browser when the browser is compatible with the JS
requirements, and run them on the server otherwise. Doing this rises a
ton of technical challenges that I am addressing, but among them is
the fact that the JS on client is stateful.
When you click something to interact with it, the JS handles the
request, and the state of the web page and of all the JS data remains
intact awaiting your next request.
|
Show full article (1.50Kb) |
no comments
|
|
|
Author: Martyn SmithMartyn Smith
Date: Mar 27, 2007 18:26
I have a weird problem, I'm binding a function like so ...
$cx->bind_function(connect => sub {
my ($param1, $param2) = @_;
# ...
});
If I call the function like this ...
connect(function () {}, 'string');
it's fine, everything works as I expect.
If I call it like this however ...
connect('string', function () {});
$param1 comes through as undef, and the function comes through fine.
Anyone have any ideas ?
--
Martyn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
|
Show full article (0.66Kb) |
no comments
|
|
|
Author: Jesse ThompsonJesse Thompson
Date: Mar 25, 2007 02:43
Hello!
Bravo on continuing development Claes, the E4x support looks smashing. I
haven't used E4x yet in practice but I understand the theory and I am quite
excited!
What I am researching right now however is database support. I do not expect
you to build that into JavaScript.pm of course. All I would like is some way
to access perl's DBI cpan module from Javascript.
I run into problems trying to bind_class DBI and it's ilk (such as the
DBI::db object returned by &DBI;::connect). First of all, I am required to
enumerate the methods I wish to have access too. PERL is sort of designed so
that I cannot know what methods an object might have, so this is
troublesome. Is there a possibility to, on request, allow pass through
access to an object's methods? Maybe working sort of like PERL's own
AUTOLOAD mechanism? DBI::db is espescially difficult. I can't bind as a
method "DBI::db::do" because it's not a code reference. I expect it's an
inherited method.. from heaven knows where. :P
I'm also a trifle confused by the "constructor" requirement in bind_class.
Factory built objects like the DBI::db's do not require JavaScript
accessable constructors.
|
Show full article (1.73Kb) |
no comments
|
|
|
Author: Stig BrautasetStig Brautaset
Date: Mar 8, 2007 15:56
Hi Martyn,
Where did you install SpiderMonkey? If you installed it into /usr/
local/lib (the default?) you may need to add that directory to /etc/
ld.so.conf and re-run /sbin/ldconfig .
Hope that helps,
Stig
On 8 Mar 2007, at 20:36, Martyn Smith wrote:
> So I managed to get it to build, and the tests ran and passed.
>
> But now I have the problem of having installed it (I used dh-make-perl
> still), and it obviously isn't using my compiled version of...
|
Show full article (2.31Kb) |
no comments
|
|
|
Author: Martyn SmithMartyn Smith
Date: Mar 8, 2007 12:36
So I managed to get it to build, and the tests ran and passed.
But now I have the problem of having installed it (I used dh-make-perl
still), and it obviously isn't using my compiled version of the
SpiderMonkey lib
Any ideas on what I need to change to make that happen ?
--
Martyn
On Tue, 2007-03-06 at 22:05 +0100, Claes Jakobsson wrote:
> Hi,
>
> There seems to be something wrong currently with the build process
> when linking aginst Debian supplied spidermonkey. Others have...
|
Show full article (2.23Kb) |
no comments
|
|
|
Author: Martyn SmithMartyn Smith
Date: Mar 6, 2007 13:09
Right, I'll give that a whirl when I get a chance ... thanks for the
quick response :)
--
Martyn
On Tue, 2007-03-06 at 22:05 +0100, Claes Jakobsson wrote:
> Hi,
>
> There seems to be something wrong currently with the build process
> when linking aginst Debian supplied spidermonkey. Others have...
|
Show full article (2.04Kb) |
no comments
|
|
|
Author: Martyn SmithMartyn Smith
Date: Mar 6, 2007 12:46
I tried using dh-make-perl to build a new version of JavaScript (Debian
Sid only has 0.55 :( )
I'm having the tests fail with messages like ...
t/00-init.........................NOK 1# Tried to use 'JavaScript'.
# Error: Can't load '/home/martyn/src/debian/JavaScript-1.03/blib/arch/auto/JavaScript/JavaScript.so' for module JavaScript: /home/martyn/src/debian/JavaScript-1.03/blib/arch/auto/JavaScript/JavaScript.so: undefined symbol: js_InternalInvoke at /usr/lib/perl/5.8/DynaLoader.pm line 225.
# at (eval 3) line 2
# Compilation failed in require at (eval 3) line 2.
# BEGIN failed--compilation aborted at t/00-init.t line 5.
# Looks like you failed 1 test of 1.
t/00-init.........................dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 1
Failed 1/1 tests, 0.00%% okay
I have installed libmozjs-dev and libmozjs0d, I'm not quite sure what to try next :(
Any ideas?
Thanks,
Martyn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
|
Show full article (1.18Kb) |
1 Comment |
|
|
|
|
Author: RMADHWANRMADHWAN
Date: Feb 27, 2007 03:31
Hi All,
I am trying to achieve following.
I have a CGI-perl script, which creates a drop-down combo-box.
I wish to capture value change event in my CGI-perl script.
I know, I can get onChange event in JavaScript, but how do I pass the
selected item of combo-box to my CGI-perl script?
Regards,
Rakesh
|
|
no comments
|
|
|
|