Forum Moderators: open

Message Too Old, No Replies

Saving a file using JavaScript

IUsing forms to update (and save) a webpage

         

Boss_Hogg

9:58 pm on Jul 15, 2003 (gmt 0)

10+ Year Member



I am creating a website for a friend's non-profit commitee. He wants a page that contains a form to enter user information. When submitted, it will update another page containing the information, where it will be saved.

I am not sure if this is even possible in JavaScript, but if it is, how would I do it?

hakre

8:00 am on Jul 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hi!

have you tried to create this page in the browser of the user on the fly with document.write? then the user might be able to save the webpage.

- hakre

le_gber

8:04 am on Jul 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could do something with javascript, that for example prompt the user his name and then display his name like 'hello name, welcome to our site'.

If you just want your friend to see the info, you could use the form to send him the data through an email with form handler scripts (generally perl but can be done is ASP or PHP).

If you want the information to be saved and viewable by everybody, I think you are looking at server side scripting (ASP, PHP, Coldfusion) rather than client side (javascript) and you might need a database of some sort to store the data.

If you could be a bit more precise about the aim/use of the data from the form, somebody here could give you the proper answer.

Leo

Boss_Hogg

2:29 pm on Jul 16, 2003 (gmt 0)

10+ Year Member



Sorry, I don't think I was clear enough.
This webpage that I am making for a co-worker, is a listing of non-profit agencies.
The page that I want saved contains a list of agencies and their contacts

(eg. ABC Association, John Doe, (800) 555-1313, jdoe@ABC.org
DEF Council, Jane Doe, (800) 555-5522, jane@defcouncil.net etc...)

The page will be saved on the server.
This information will be seen by everyone.
The information will be entered on a form on another page (eg. info.html), and will be saved and shown on the list of agencies page.

If JavaScript won't work, could I use JSPs? I am on a deadline (not for a month or two), and I don't want to try to learn a new language in that time.

Hope this helps

-Boss_Hogg

le_gber

2:48 pm on Jul 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yep JSP is fine although I don't know it.

All you nee do to is populate the database with the form entries and populate the page with the database entry

Leo