[ back to toc ]

using formmail 1.5 with javascript

Date: 2002/03/16 11:59

Q:
I'm trying to use formmail inline with my javascript powered software
download section,

This is how I want it to work...

Customer clicks link for download they want.
Their link is passed to your form using the URL.
Once they fill out and submit the form the original link is again passed
using the URL.
They are now at my "agreement page".
If they agree the download starts.
If not they are directed back to my home page.

This is my problem. I'm using this code (along with other) to assign value
to the "redirect" input tag.

<script>
<!-- Begin
function formLink() {
link = unescape(params["link"]);
document.CustInfo.redirect.value =
"/support/agreement2.html?link=" + link;
}
// End -->
</script>

The link below shows up in the "redirect" text field.

/support/agreement2.html?link=http://www.zworld.com/index.html

When I submit the form only "/support/agreement2.html" is used.

Does Formmail trim "?link=http://www.zworld.com/index.html" as a security
precaution?

A:
Dear *NAME-DELETED*!

I am not a real expert in the field of JavaScripts. I was playing around
with this piece of code you provided and found that IE 5.00.3315.1000 does
not know what to do witht he array params. This can be a problem.

I do not believe that formmail does anything like that, what you say,
because it can not technically. The cgi script has a URL and sends you
back a page containing the JavaScript. The cgi script can control the
content of the page sent back, but the URL where the page comes from is
not within the reach of the script. And as far as I can understand you,
you need the CGI parameter used in the JavaScript, which is an input
parameter for the cgi script as well as for the JavaScript.

Regards,
Peter

[ back to toc ]