Re: Save to Local Disk

From: Date: Tue, 06 Feb 2001 16:07:46 +0000
Subject: Re: Save to Local Disk
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-38392@lists.php.net to get a copy of this message
Hi Karl, Simply put a save button on your page. When it's clicked, pass document.forms[0].textareaname.value to the other script, (it's written in javascript, if you're familiar with that), then you'll access the content of the text box. to save it on a local disk, simply use javascript again, it will help you save a file on disk. [altough there are some security reasons which prohibit you write on the client's side, you can still do that using the below script] it's a good guide. however, you have to change some parts: <BODY> <FORM> <TEXTAREA NAME="output" COLS=60 ROWS=10 WRAP="virtual"></TEXTAREA><BR> <INPUT TYPE="button" VALUE="Read File" onClick="this.form.output.value= ''; fetchFile(this.form);" ID="2"><BR> <TEXTAREA NAME="input" COLS=60 ROWS=10 WRAP="virtual"></TEXTAREA><BR> <INPUT TYPE="button" VALUE="Save File" onClick="setFile(this.form.input.value);" ID="3"><P> <INPUT TYPE="button" VALUE="New Window..." onClick="newRaisedWindow();" ID="4"> </FORM> </BODY> hope it works, Ahmad Anvari ----- Original Message ----- From: Karl J. Stubsjoen To: PHP Mailing List Sent: Tuesday, February 06, 2001 6:23 PM Subject: [PHP] Save to Local Disk Hello, I'd like to give the user an option to "Save to Disk" the contents of a text area. Any ideas how to do this? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#38392) next »