Export Button

I

IJD

HI,

Totally newbie question but I just can't get the syntax right.

I am trying to export a form as a mht file with the name based on a field in
the form.

Can anyone advise where I am going wrong in the following code?

Thanks

Iain

{



var saveField

=XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:Cases/@Client_Name");

var name = saveField.text;



XDocument.SaveAs("C:\"&name&".mht");

}
 
E

evilgenius

I believe the problem is that in javascript\jscript the + character is
the concat character so try:

XDocument.SaveAs("C:\"+name+".mht");
Or
XDocument.SaveAs("C:\\"+name+".mht"); (I have had some issues with the
slash character)

eg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top