Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 29th, 2012, 10:00 AM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 112
Thanks: 12
Thanked 0 Times in 0 Posts
Default write to text file the table displayed on screen

Hi all...

the text file gets created that works but its blank...

the loop doesn"t work.. an i doing something wrong... or may be we can"t do this???

thanking you inadvance
Rino

<script language=javascript>
function SaveToText()
{
var object = new ActiveXObject("Scripting.FileSystemObject");
var file = object.CreateTextFile("C:\PO.csv", true);

for (var x=0;x<detailsTable;x++)
{
file.WriteLine(detailsTable);
}
file.Close();
}
</script>

....

Response.Write "<br><table id=" & Chr(34) & "detailsTable" & Chr(34) & " border=1 align=" & Chr(34) & "center" & Chr(34) & ">" & Chr(13)
Response.Write "<TR>" & Chr(13)

Response.Write "<TD BGCOLOR=" & Chr(34) & "#CFCFCF" & Chr(34) & "ALIGN=" & Chr(34) & "center" & Chr(34) & "><B>" & "Store" & " </TD>" & Chr(13)
...

If not rs.eof Then
Do until rs.eof
Response.Write "<tr>" & Chr(13)
Response.Write "<TD VALIGN=" & Chr(34) & "TOP" & Chr(34) & "ALIGN=" & Chr(34) & "left" & Chr(34) & ">"& rs("ISTORE")&"</TD>" & Chr(13)
...
...





Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I open text file to the screen autostrad C++ Programming 1 August 30th, 2010 08:32 PM
How can I open text file to the screen autostrad Visual C++ 0 December 18th, 2009 12:34 AM
How to write to text file ? method Beginning VB 6 1 April 13th, 2006 01:54 AM
Write ASCII text file muklee C# 1 December 12th, 2004 09:40 PM
Write Text file from recordset rylemer Access 2 December 5th, 2003 10:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.