dynamically setting form action - PLEASE HELP

Discussion in 'Javascript' started by Sergej Prokoviev, Jan 23, 2008.

  1. 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.
    Sergej Prokoviev, Jan 23, 2008
    #1
    1. Advertising

  2. Sergej Prokoviev

    Jim Guest

    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
    Jim, Jan 23, 2008
    #2
    1. Advertising

  3. 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 <> 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
    Sergej Prokoviev, Jan 24, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joe Bloggs
    Replies:
    1
    Views:
    719
    Sudsy
    Aug 3, 2003
  2. KK
    Replies:
    2
    Views:
    516
    Big Brian
    Oct 14, 2003
  3. Nathan Sokalski
    Replies:
    0
    Views:
    431
    Nathan Sokalski
    Feb 2, 2007
  4. John
    Replies:
    0
    Views:
    843
  5. What-a-Tool
    Replies:
    3
    Views:
    107
    What-a-Tool
    Jun 15, 2004
Loading...

Share This Page