Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

cpath/exportasFDF and predefined name not working-uses old path/no name!

52 views
Skip to first unread message

Oliver...@adobeforums.com

unread,
Jun 29, 2004, 10:30:36 AM6/29/04
to
Hi everyone.
Maybe someone can help me with a little problem I have.
I wrote this JS so if the pdf is closed on a Sunday it will be automatically exported as a fdf under a predefined path and a name from a field information. Since I use the cPath parameter I have to make it when the user closes the form and not presses a submit button.
Here is the script:

var objDate = new Date();
var dayOfWeek = objDate.getDay();

if (dayOfWeek == 0 )
{
var g= "/c/temp/brad/" + this.getField("date01").value + ".fdf";
this.exportAsFDF(true,true,(g.value));
}
---------------
date01 is the field which the file will be named after (which is an entered date e.g. 06-05-04.fdf)
The path is "/c/temp/brad/" that's where I want the file to be exported to

The function works great and if it is Sunday (change system time to test) then a window pops up telling you to save it as a fdf. My problem is now that it does not use the specified path and also not the predefined name. It just ends up in the path where the orig. pdf is in and as a name it has *.fdf.
I wanted to automate that process so the user doesn't have to search for folders in big folder trees and names it wrong.
I also tried the following expressions, which resulted in the same thing:

this.exportAsFDF(false, true, "","", "/c/temp/brad/mypdf.fdf");
And
this.exportAsFDF({ bAllFields:false, cPath: "/c/temp/mypdf.fdf"});

Still does not use the path and name.
Maybe someone has experience with this and got it to work, before.
I also thought the process would be automated with the exportasfdf parameter and no window to save comes up, I might be wrong, but maybe that can be eliminated, too so that everything happens behind the scenes.
Thanks in advance,

Oliver Stohr

0 new messages