kaartz has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: I need to pass a URL from a java script to a PERL script
by NetWallah (Canon) on Jun 25, 2008 at 05:12 UTC
    What aspect of the problem do you need help with, and what have you tried ?

    What browsers, what web server ?

    <off-topic>If you are attempting to handle RIGHT-CLICK via javascript, there are compatibility issues, and disagreements between Microsoft and W3C, and bugs in Safari. Details here

    </off-topic>.

    If you need help making a page with perl script ($script) to handle the form results, please RTFM on cgi, then ask a specific question.

         Have you been high today? I see the nuns are gay! My brother yelled to me...I love you inside Ed - Benny Lava, by Buffalax

Re: I need to pass a URL from a java script to a PERL script
by CountZero (Bishop) on Jun 25, 2008 at 05:53 UTC
    That is a Javascript problem not a Perl problem.

    Your Perl script (running on the web-server) will simply receive whatever your Javascript script cares to send it. All you have to do is to make sure that Javascript sends what Perl expects to receive (or vice versa of course). The standard to pass this info along is the CGI-standard which is fully (computer) language agnostic.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: I need to pass a URL from a java script to a PERL script
by olus (Curate) on Jun 25, 2008 at 10:17 UTC

    Though not being a Perl question, I'll offer some considerations.

    • 1. It is not clear where you would need the mouse right button handling. From what you show, you don't need that at all.
    • 2. Javascript would come handy if you handled the button mouse clicking events and acting on the action url accordingly. Maybe onClick.
    • 3. For that code, you would not need javascript at all if instead of using three submit buttons you used radio buttons or select to have the user choosing which Tool to go to. The script would receive the choice as a parameter, just like your save_url.

    Hope that helps.