in reply to JavaScript & Perl

I'm no JavaScript expert (as jlp will point out), but I thought it was document.location = "foo".

GET requests are typically passed in the URL string. Look at the URL window right now and see something like ?node_id=24135. You could just append something like "?$name=$value" to your query string for the redirection, but watch out for quoting issues.

Personally, I'd handle it all in the CGI script:

use CGI; my $q = CGI->new(); my $rbutton = $q->query('fred'); if ($rbutton eq 'is a loser') { fred_is_a_loser($q); } elsif ($rbutton eq 'is a hero') { fred_is_a_hero($q); } else { # who is fred? # or someone edited HTML locally default($q); }
The subroutines, of course, would do whatever your specific other scripts do.

Replies are listed 'Best First'.
RE: Re: JavaScript & Perl
by ar0n (Priest) on Jul 24, 2000 at 23:05 UTC
    I'm no JavaScript expert (as jlp will point out), but I thought it was document.location = "foo".

    Actually, it's:
    location.href = "http://someplace.com";
    Meaning that's what seems to work for me (whereas location won't under netscape :)
    location is merely an implicit way of stating document.location.

    -- ar0n