Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > dynamically setting form action - PLEASE HELP

Reply
Thread Tools

dynamically setting form action - PLEASE HELP

 
 
Sergej Prokoviev
Guest
Posts: n/a
 
      01-23-2008
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.
 
Reply With Quote
 
 
 
 
Jim
Guest
Posts: n/a
 
      01-23-2008
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
 
Reply With Quote
 
 
 
 
Sergej Prokoviev
Guest
Posts: n/a
 
      01-24-2008
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!

On Jan 23, 4:12*pm, Jim <(E-Mail Removed)> wrote:
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Struts: 1 action, 1 Form, several views handled by 1 only action. Any idea for better design? John Java 0 06-26-2007 11:22 PM
Programmatically setting the action attribute of the form tag Nathan Sokalski ASP .Net 0 02-02-2007 06:26 AM
How can I dynamically set a <form runat="server"...> action parameter? Kevin Blount ASP .Net 4 08-24-2006 01:50 PM
dynamically change struts' form's action ctyberg Java 5 12-15-2004 05:32 PM
Struts Static Action Form vs Dyanamic Action Form Joe Bloggs Java 1 08-03-2003 02:30 AM



Advertisments