View the Most Wanted LQ Wiki articles.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-16-2008, 01:20 AM   #1
LQ Newbie
Registered: Aug 2008
Posts: 6

Rep: Reputation: 0
Javascript for writing data to file


I am using cgi-bin to write the html code and call javascript.I have a web page consisting of a Listbox and a button. I want that as soon as I click on that button the javascript should be called that stores the values of the listbox into the file.Can anyone suggest me the code for the javascript.

Thanks in advance....
Old 10-16-2008, 06:17 AM   #2
Senior Member
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,507

Rep: Reputation: 128Reputation: 128
Are you talking about server-side javascripting or should the file be stored n the client's machine?
Old 10-16-2008, 03:55 PM   #3
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 509

Rep: Reputation: 41
There are two or three js-libs handling this.

They add a wrapper around the necessary XPCOM-stuff and make file i/o more javascript-ish.

And bare in mind that you're usally not supposed to write to files from within a user's browser but the cookie jar and under certain well defined circumstances of some add-ons.

If you want to write the list back on the webserver, you usally transfer the data back from javascript to the server with whatever method is best for your project (send back as a form, stuff it into ajax..).



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript:Combobox creation taking data from DB On button click Manashi Programming 5 03-12-2015 03:38 AM
Writing to a from using javascript Penguin of Wonder Programming 3 02-27-2008 07:31 PM
writing raw data to a tiff file James_dean Programming 4 10-25-2005 06:03 AM
CD RW -- Writing Data to CD dnachtwey Linux - Hardware 39 01-25-2004 07:22 PM
perl - writing a data structure to a file.. is it possible? paavaka Programming 4 07-14-2001 01:04 AM

All times are GMT -5. The time now is 02:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration