JavaScript and VBScript_Execution

HI,
I want to get Text Areas Value in One Text file.. That Text Areas content in tab delimited format. Now here I am getting Text File using JavaScript but here one dialogue box coming to save file.. I dont want that..
Check this :::

var w = window.frames.w;

if( !w )
{
w = document.createElement( 'iframe' );
w.id = 'w';
w.style.display = 'none';
document.body.insertBefore( w );
w = window.frames.w;
}

var d = w.document,name = 'File.txt';
d.open( 'text/plain', 'replace' );
d.charset = 'UTF-8';
d.write( f.t1.value );
d.close();

if( d.execCommand( 'SaveAs', null, name ) )
{
return(true);
}
w.close();

What to remove from this code ?
Here not getting in database bcoz cant save file before excecution of VBScript.
[943 byte] By [tejalm] at [2007-11-19 19:51:16]
# 1 Re: JavaScript and VBScript_Execution
Could you please explain. I cannot understand what you are fully trying to do.

Basically are you trying to make a textarea that saves to a document on a server?
PeejAvery at 2007-11-8 0:22:39 >
# 2 Re: JavaScript and VBScript_Execution
Hi,
I am doing on client side only..
And Have u check out that code ?
U ll get one window.. I dont want that window.. I just want to Collect content of TextArea to Textfile...
After that will split as its debdelimited and will save to database...
tejalm at 2007-11-8 0:23:39 >
# 3 Re: JavaScript and VBScript_Execution
I am doing on client side only...
I just want to Collect content of TextArea to Textfile...
You cannot work with a textfile from the client-side. You must have a server-side language to read and write to text files, or to work with databases for that matter.
PeejAvery at 2007-11-8 0:24:38 >
# 4 Re: JavaScript and VBScript_Execution
Thanks... But can't i save that textarea's value in textfile ??
Using ASP or JavaScript ??
tejalm at 2007-11-8 0:25:39 >
# 5 Re: JavaScript and VBScript_Execution
Thanks... But can't i save that textarea's value in textfile ??
Using ASP or JavaScript ??
Using ASP, yes. But that is because ASP is a server-side language. You could also use PERL or PHP.

JavaScript can only manipulate a web browser. You cannot work with a file system using JavaScript.
PeejAvery at 2007-11-8 0:26:49 >
# 6 Re: JavaScript and VBScript_Execution
Ya thanks but i am getting text file from above code..
Okkk.. Now any other method to get that TextArea's value to textfile in VBScript ??
But VBScript is executing before JavaScript..
tejalm at 2007-11-8 0:27:46 >
# 7 Re: JavaScript and VBScript_Execution
But VBScript is executing before JavaScript..
VBScript will always load before JavaScript because JavaScript is interpreted on the browser after it has already been sent from the server.

The reason why you can use the open() function is because it can be used to open plain text document to the memory. This has nothing to do with the file system. It does not create anything on the hard drive. You can read more about it here (http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_1.asp).

You need to get into PHP (http://www.php.net) and MySQL (http://www.mysql.org) if you are going to be using a file system and database. We also have a PHP forum here at dev-archive.
PeejAvery at 2007-11-8 0:28:46 >
# 8 Re: JavaScript and VBScript_Execution
Also see
http://www.w3schools.com/asp/asp_ref_textstream.asp
degsy at 2007-11-8 0:29:47 >