No, this doesn't work.
I get an error message saying something is wrong in my script (on line 36).
So I checked line 36 and it is this:
XDocument.UI.SetSaveAsDialogLocation("C:\temp\");
What's wrong with that?
If i remove this line and just use my SetSaveAsDialogFileName, it doens't
work either. The form opens, but when I try to save, it gives me the standard
name again: Form1 (and not my date form Field1).
How a man can suffer whilst making a form :D
> Try removing the double quotes around "nodeselname.text" like this
>
[quoted text clipped - 16 lines]
> > But this doesn't work. What I'm I doing wrong?
> > Can anyone give me the code (JScript)?
S.Y.M. Wong-A-Ton - 30 Mar 2006 11:24 GMT
Change line 36 into:
XDocument.UI.SetSaveAsDialogLocation("C:\\temp\\");
Did you put the code in the "OnSaveRequest" event handler? It works fine
when I try it. When you add an "OnSaveRequest" to the form through
"Tools>Form Options>Open and Save>Save using custom code" the event handler
is added for you to the form, along with some comments. You need to add your
lines of code before the following comment:
// Write the code to be run before saving here.
---
S.Y.M. Wong-A-Ton
> No, this doesn't work.
> I get an error message saying something is wrong in my script (on line 36).
[quoted text clipped - 29 lines]
> > > But this doesn't work. What I'm I doing wrong?
> > > Can anyone give me the code (JScript)?