dynamically setting form action - PLEASE HELP

S

Sergej Prokoviev

I'm relatively new to javascript. OK, I'm not very adept at it. Here's
what I'm trying to do:

1. User wants to request a document, MyFileName.pdf. User clicks on
link. Link has a parameter set with it, something like?ID=MyFileName
(../resources/resource-center.html?ID=MyFileName). Link takes user to
form request-form.html he needs to fill out to get to the document he
has requested.
2. Upon submit, user is taken to document he originally wanted, for
example MyFileName.pdf, and the form data posts to a file that is
submitted to me.

I've been all over cyberspace and beyond to figure out how to get the
user to the document AND at the same time post the data to the file.

PLEASE HELP! THANKS!

PS. I'm using Dreamweaver CS3, if that makes any difference.
 
J

Jim

Javascript has nothing to do with any of this, unless you're talking
about server side.

1. User clicks on a link with the document ID embedded in the query
string. Javascript not needed. However, instead of ../resources/
resource-center.html?ID=MyFileName, I would link to an .ASP/.ASPX/.PHP/
etc. file. You're gonna need *something* on the back end.

2. The backend catches the ID from the query string, and sends the
form to the browser. Included in this form can be the ID, and
whatever fields you need to collect.

3. After the enduser has filled out the form and re-submitted back to
the server, the server can a) save the form data in a file/database/
email and b)send the requested resource to the end-user.

In none of this is there any need for client-side Javascript.

Jim
 
S

Sergej Prokoviev

Thanks for the prompt reply. I thought I had to do this server-side,
but somebody at work here was insisting on it being doable in
JavaScript. Go figure!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top