Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Can Dreamweaver store data to a .txt file?

New Here ,
Jan 22, 2007 Jan 22, 2007

Copy link to clipboard

Copied

I've seen a way Dreamweaver can store data to .txt file, but it requires creating a blank.txt file first and then placing the blank.txt file in a folder that Dreamweaver will load the results from a form into.

What I really want to know is, can Dreamweaver store the data directly to a .txt file without the need to create the blank.txt file (sort of like the process for creating a simple csv file). If it can be done, can you share the process?

Thank you
TOPICS
Server side applications

Views

635
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 23, 2007 Jan 23, 2007

Copy link to clipboard

Copied

On 23 Jan 2007 in macromedia.dreamweaver.appdev, yleokim wrote:

> I've seen a way Dreamweaver can store data to .txt file, but it
> requires creating a blank.txt file first and then placing the
> blank.txt file in a folder that Dreamweaver will load the results
> from a form into.
>
> What I really want to know is, can Dreamweaver store the data
> directly to a .txt file without the need to create the blank.txt
> file (sort of like the process for creating a simple csv file). If
> it can be done, can you share the process?

If I'm reading your request correctly: Dreamweaver can't store
/anything/ from a form to a text file. It's the server that does that.
And as far as I know, DW doesn't have any server behaviors for text
files, so you'll have to code those by hand.

Not knowing what kind of scripting your server supports, the process
would go like this:

- Make sure that you have write permission on the directory where you
want to create the file.
- (Pseudo) Code looks like this:
<*pseudo
if (file exists) {
// Code to append information goes here
} else {
// Code to create file and check creation goes here
// Code to insert information goes here
}
*>

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 23, 2007 Jan 23, 2007

Copy link to clipboard

Copied

Thank you Joe!

Yea, it might have been more clear to say that with the form object and the properites tool (in Dreamweaver) one can create two hidden fields ---- the first can tell the form how to find the template and then the second can tell the form where to send the data (into a csv file). I was just wondering if there was a way to go directly to the .txt file instead of to a csv file.

I think the answer you gave me will be very helpful -- I tend to think based on input from another friend today that your idea is a good suggestion.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 24, 2007 Jan 24, 2007

Copy link to clipboard

Copied

On 24 Jan 2007 in macromedia.dreamweaver.appdev, yleokim wrote:

> I was just wondering if there was a way to go directly to the .txt
> file instead of to a csv file.

A .csv file is a text file; it just has a specific format so that
applications can understand the contents.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 24, 2007 Jan 24, 2007

Copy link to clipboard

Copied

LATEST
I've used Tom Muck's Force Download extension and a normal recordset loop to
dynamically build CSVs in the past. It's not too tough, and doesn't require
you have a text file already created before adding to it. It builds the
file in server's buffer, then streams it directly to the client. It's
essentially the same technique for pushing any other file to the client:

http://www.tom-muck.com/extensions/help/ForceDownload/

Best regards,
Chris

"yleokim" <webforumsuser@macromedia.com> wrote in message
news:ep48uv$lpj$1@forums.macromedia.com...
> I've seen a way Dreamweaver can store data to .txt file, but it requires
> creating a blank.txt file first and then placing the blank.txt file in a
> folder
> that Dreamweaver will load the results from a form into.
>
> What I really want to know is, can Dreamweaver store the data directly to
> a
> .txt file without the need to create the blank.txt file (sort of like the
> process for creating a simple csv file). If it can be done, can you share
> the
> process?
>
> Thank you
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines