PDA

View Full Version : Save Form Elements to File


emory
10-11-2002, 05:51 PM
Hi,
I want to invoke a "save as" dialogue to save some form element values into a new file on the local machine. I'm guessing I could do a document.write somehow. Anyone know a good way to do this?
Thanks,
Emory

//script might look like this

<script language="javascript">
window.document.execCommand("SaveAs");
</script>

//The form elements would look like this:

<FORM name="myform"><input type="input1" value="Save As">

<input type="text" name="comments">

<select name="user">
<option value="user1">Person1</option>
<option value="user2">Person2</option>
</select>

<input type="radio" name="r1" value="">
<input type="radio" name="r1" value="">

</Form>

requestcode
10-11-2002, 05:58 PM
Javascript can not wirte to files. You will have to use a Server Side language for that.

adios
10-11-2002, 06:02 PM
http://www.faqts.com/knowledge_base/view.phtml/aid/5785/fid/53

[untested]