Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-29-2012, 03:42 AM   PM User | #1
bheema
New Coder

 
Join Date: Nov 2012
Posts: 11
Thanks: 4
Thanked 0 Times in 0 Posts
bheema is an unknown quantity at this point
HTML form using javascripct save in CSV format

I want to save the form using this makeFile() function.I want it to save the whole form in csv format..How can i make it read the whole file...TQ...n Am i doing it correctly?Please help me solve this problem...


function makeFile(){
var fso = newActiveXObject("Scripting.FileSystemObject");
var fileLoc = "E:\sample.csv";
var file = fso.CreateTextFile(fileLoc, true);
file.writeline();
file.Close();
alert('File created successfully at location: ' + fileLoc);
}


<form name="form1" action="" method="get">
TESTER <input type="text"/> DATE <input type="text" /> EMP NO <input type="text" /> 6S DONE <input type="text" />

<br />
<br />

WW <input type="text" size="8"maxlength="8"/> NAME <input type="text" /> SHIFT <input type="text" />

<br />
<br />
<br />

PASSOVER (Please verify Summit Receipe & Storm before start shift)

<br />
<br />
<br />


Summit Receipe OK ?
<select name="">
<option value="" style="display:none;"></option>
<option value="Yes">Yes</option>
<option value="No">No</option>
</select>

<br />
<br />

Motif/ Storm OK ?
<select name="">
<option value="" style="display:none;"></option>
<option value="Yes">Yes</option>
<option value="No">No</option>
</select>

<br />
<br />
<br />

<p>
<input type="button" value="Add" onclick="addRowToTable();" />
<input type="button" value="Delete" onclick="removeRowFromTable();" />
</p>
<p>
</p>
<table border="1" id="tblSample">
<tr>
<TH>Num</TH>
<TH>Lot Number</TH>
<TH>Location</TH>
<TH>Total In</TH>
<TH>1 * Test</TH>
<Th>2 * Test</TH>
<TH>3 * Test</TH>
<TH>Total Out</TH>
<TH>Lot Status</TH>
<TH>Remark</TH>

</tr>
</table>

<br />
<br />
<br />
<input type="button" value="Add" onclick="addRowToTable2();" />
<input type="button" value="Delete" onclick="removeRowFromTable2();" />
</p>
<p>
</p>
<table border="1" id="tbl">
<tr>
<TH>Num</TH>
<TH>Entry</TH>
<TH>Down</TH>
<TH>Up</TH>
<TH>Failure Mode/ Action/ Remark</TH>
<Th>D/T</TH>
<TH>Attended By</TH>

</tr>
</table>
<br />
<br />
<input type="submit" value="Submit" onclick="makeFile();"/>
</form>
</div>
</body>
</html>
bheema is offline   Reply With Quote
Old 11-29-2012, 07:46 AM   PM User | #2
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,532
Thanks: 0
Thanked 503 Times in 494 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
What browser are you trying to run that in - Old versions of Internet Explorer are the only browsers that will support some of those commands.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Users who have thanked felgall for this post:
bheema (11-30-2012)
Old 11-30-2012, 12:18 AM   PM User | #3
bheema
New Coder

 
Join Date: Nov 2012
Posts: 11
Thanks: 4
Thanked 0 Times in 0 Posts
bheema is an unknown quantity at this point
I am using IE 8.0.....Can u please tel me is it possible to save a input HTML form in local drive...N what kind of coding shud be used in order to do that?TQ
bheema is offline   Reply With Quote
Old 11-30-2012, 05:36 AM   PM User | #4
bheema
New Coder

 
Join Date: Nov 2012
Posts: 11
Thanks: 4
Thanked 0 Times in 0 Posts
bheema is an unknown quantity at this point
Can ani1 please ans this...I nid to finis tis by tis week
bheema is offline   Reply With Quote
Reply

Bookmarks

Tags
html, javascript, jquery

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:18 AM.


Advertisement
Log in to turn off these ads.