57 users online (0 members and 57 guests)  


  Results 1 to 5 of 5

Related

  1. perl not executing from PHP    Forum: CGI Perl Forum
    Replies: 1
  2. Replies: 0
  3. How to get value from javascript to PERL    Forum: CGI Perl Forum
    Replies: 1
  4. Executing the PERL CGI Script    Forum: CGI Perl Forum
    Replies: 1
  1. #1
    Nongolf's Avatar
    New User

    Status
    Offline
    Join Date
    May 2007
    Posts
    3

    Javascript executing perl?

    Hello, I'm not sure that this is the most appropiate forum, as my problem involves perl as well.
    In any case, I'm attempting to have a javascript execute a perl file. I have a htm document with a line like:
    HTML Code:
    <SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript" SRC="perl_med_java_test.pl"></SCRIPT>
    And the file it's suppose to execute looks like:

    Code:
    #!C:\Perl\bin\perl.exe
    print "<!-- BEGIN\n";
    print "document.write(\"perl test\");\n";
    print "// END -->";
    But nothing happens, and I can't see why.
    I'd be very grateful for any insigts here.
    Nongolf.
    Last edited by DeadMeatGF; 05-10-2007 at 09:11 AM. Reason: changed formatting for code tags

  2. #2
    vinyl-junkie's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    721

    Re: Javascript executing perl?

    As far as I know, this isn't something you can have javascript do for you. Javascript scripts execute javascript code, not Perl code or any other scripting language.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more

  3. #3
    Nongolf's Avatar
    New User

    Status
    Offline
    Join Date
    May 2007
    Posts
    3

    Re: Javascript executing perl?

    Yeah, I did think it sounded almost too good to be true, but I didn't make it up myself.

    I was looking for a simple visit-counter that I could understand/modify. I found this:

    designz.yoll.net/text_counter.html

    I would have added the h-t-t-p stuff in front there, only this rather anal forum won't let me - even with the auto-parse link option unchecked.

    May wanna look into that, admin. I even had to leave the page and come back here before I was allowed to post.
    Bad admin! Shame on you!

    Thanks.
    Nongolf

  4. #4
    vinyl-junkie's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    721

    Re: Javascript executing perl?

    Looks like the instructions for that script are pretty straightforward. What sort of modifications to the code are you trying to make? We don't really have a Perl expert here on the forums (that I'm aware of anyway), but perhaps we can still help.

    Just so you know, the AHFB forums require you to have 5 quality posts before you can post a link. It's an anti-spam measure.

    As a side note, I noticed that website you mentioned launches a new and decidedly spammy window. Not your fault, but whoever owns that website should be shot!
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more

  5. #5
    Nongolf's Avatar
    New User

    Status
    Offline
    Join Date
    May 2007
    Posts
    3

    Re: Javascript executing perl?

    Looks like the instructions for that script are pretty straightforward. What sort of modifications to the code are you trying to make?

    Well, none that I wasn't forced to yet. It didn't run, so I made sure that the javascript was executing with a simple "write.document" call. Since that checked out, I tried to make sure that the perl program was executing by making it real simple (or so I think). I replaced all the perl with those three simple print calls described in my first post.
    That's where I am now. I can't verify that the perl bit is actually executing.

    Just so you know, the AHFB forums require you to have 5 quality posts before you can post a link. It's an anti-spam measure.

    Yeah, I was told so - and also how I would be allowed to post an URL: by unchecking the "Automatically parse links in text". And that's perfectly fine, only it didn't work - I had to leave this here reply page and come back to re-post.

    As a side note, I noticed that website you mentioned launches a new and decidedly spammy window. Not your fault, but whoever owns that website should be shot!

    My apologies. I haven't had any windows launched myself.

    Nongolf, would settle for some tar and feather-rolling.



Tags for this Thread