1

I will use same string in one application to create files.
If i using strings one time text from user adding normally to file and existing, after add option to display content from string program generating blank file, why? To display i used
alert("File content:","FileName: "+name+".");
What i doing wrong?

You must know... Cats are soft!

Thumbs up

2

If you're saying that you're trying to print the file contents using alert() and not seeing file contents, it looks like you're not actually printing the file contents itself.

I'm assuming name just holds the name of the file, but notice then that you're missing the contents variable (or whatever variable you're storing the contents in.)

Don't code while you're tired big_smile

Thumbs up

3

I using other strings nextly to display name and content. To content is other alert with string. After add this alerts program stopping sending strings to file after press enter  to create, file generating blank

You must know... Cats are soft!

Thumbs up

4

It's hard to understand exactly what you're doing. The open method of the file object does create a blank file if you use "w" or "wb" as the mode parameter, even if you write nothing in particular.

Some of my games
Keep up to date by following @Jeqofire on twitter!
Ear Ninja?

Thumbs up

5

I'm not really sure what you're trying to say, but the code in post 1 seems valid for printing a filename you've stored somewhere else in your script to the alert box.

The bipeds think this place belongs to them, how cute.

Thumbs up