Victor
02-05-2004, 03:26 AM
Hi there.I need to get some information from a txt file that I'm using as a simple database,but I have not succeed so far.
Can you tell me what is wrong in these function?I consulted the File Object manual,but I think everything is fine!
function open_file()
{
var x;
var info = new File("filename.txt");
if(info.open("r"))
{
while(!info.eof()){
x = info.readln();
}
info.close();
}
}
</script>
<input type="button" name="search_button" onClick="open_file()" value="search">
Can you tell me what is wrong in these function?I consulted the File Object manual,but I think everything is fine!
function open_file()
{
var x;
var info = new File("filename.txt");
if(info.open("r"))
{
while(!info.eof()){
x = info.readln();
}
info.close();
}
}
</script>
<input type="button" name="search_button" onClick="open_file()" value="search">