in reply to Re: Re: funky URLs
in thread funky URLs

Well, you didn't specify this in your original post. OK, fine. Here's a solution: Put your params that you need for the CGI into a series of hidden form fields. Then call a form submit from your link via a JavaScript call.

<HTML><HEAD><TITLE>Some Page</TITLE> </HEAD><BODY bgcolor="#ffffff"> <FORM name=theform method=post action="/cgi-bin/script.cgi"> <INPUT type=hidden name=ID value=1> <INPUT type=hidden name=NAME value=ME> <INPUT type=hidden name=YOU value=YOU> <INPUT type=hidden name=HIM value=HIM> </FORM> <P>Here's a <A href="javascript:document.theform.submit();">link</a> for you.</P> </BODY></HTML>

-gryphon

Update: It was pointed out to me that not everyone uses JavaScript, and not everyone can use it. So this won't be an option that works perfectly for everyone, but it's all I could think of...

Replies are listed 'Best First'.
Re: Re: Re: Re: funky URLs
by Aighearach (Initiate) on Jun 30, 2001 at 03:04 UTC

    javascript is not up to par for creating a link.

    personally, when I see one I turn up my nose and go to another site. javascript only works right for navigational enhancements attached to images that are also normal links.

    but, if it's in a link, and you don't want them to change the values, and you need the values in your script, maybe a local config file would be a better approach? If you use mod_perl you can use fake url directories as keys into your config files, if you need to have different settings based refering site.

    and at that point, it's really easy to just tuck the config into a database instead of in files.
    --
    Snazzy tagline here