Link to home
Start Free TrialLog in
Avatar of sktripuraneni
sktripuraneni

asked on

Storing a form as it is??

I have a question that may sound absurd.
I have created a form using Microsoft Frontapage and added a couple of text boxes. Now i dont have any webserver setup , im working just on plain html. Now when i open the form in the browser and make some changes in the form, and hit submit i want to save the complete html (the page totally, it has a lot of static data popping up from some other program) along with the changes that i have made in the text boxes. Is it possible, if so what should be the code in the part of submit button.
Here is the example

<form method="POST" action="--WEBBOT-SELF--">
  <!--webbot bot="SaveResults" u-file="C:\Documents and Settings\abc\Desktop\_private\form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" --><p>&nbsp;</p>
  <p><input type="text" name="T1" size="20" value="shanta"></p>
  <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

Now say i have changed the value in T1 text box and i want to save it along with the page how to do that.
Can u help me out please
Thanks
Avatar of Mamda
Mamda

Cant understand ur question, if u mean u wanna save the page contents, then u can take a hiddent field like this within the form;
<INPUT TYPE="HIDDEN" NAME="HD1" VALUE="">
And then on the submit of form call:
<input type="submit" value="Submit" name="B1" onclick="document.all('HD1').value=document.body.innerHTML;">

If this is not wat u want, plz clearify ur question...
Take Care
Hard to answer FrontPage specific questions, since most web developers avoid it like the plague. :-(

You'd need to save your data in a cookie, at the least, in a database might be a better option - but using frontpage just limits your options, really - and keeps you from learning REAL programming.
You are not in marketing are you?

R
First to get Frontpage to work  on your server, you have to make sure that the Frontpage-Extensions are installed (check your hosting company).

If I remember correct you have to edit your form-properties in how it should manage the values submitted from your form. The most easy way is to let it save the values into a text-file.

Remeber to "publish" your form with Frontpage (not with a external ftp-client). That process makes the final modifications to your form-action so that it will work on the webserver.
Avatar of sktripuraneni

ASKER

Well it has no specifics related to Frontpage, I have just created a form using the frontpage and pasted the code. As i have already told u i have no web server setup.
My question is simple.
I use an embedded sql and embedded html program using C. I create reports using the C program, and i send the data to the html browser(explorer) as an html file across the network. Now the user who gets this file opens it prints it. However, the new problem is that the user also wants to make some changes to the file that I have sent, so I have added some textboxes and textareas. Now he wants to save the file that i have sent along with the changes(or text additions in the textarea/textbox) he had made in his local drive and will also send it to some one else .
When, he is opening the form and making changes, and thus finally saving it using the File->save As . the next time he is opening it the changes he made to the textarea are gone, in other words they are not saved. What I want to do is that I want to save all the text he entered along with the HTML file on his computer when he hits the submit button. Im not sure how to do this.
I think my question is clear.

Now according to Mamda where should i put this code, well for sure i think i have to delete that WEB-BOT stuff from the source as i created using Frontpage.
Thanks
file->saveAs will save the page *as it was loaded into the browser* so any new or dynamic input on the page will be lost.
ASKER CERTIFIED SOLUTION
Avatar of Mamda
Mamda

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thank you,
That made myself clear. I would check to see if i can make any changes in my program.
Thanks for ur comments