How do I use a generic button to submit xml instead of pdf?

Avatar

Avatar

gmailJerald

Avatar

gmailJerald

gmailJerald

19-12-2012

Hello All.

I am using the following javascript that I found to email a form:

var subject = form1.SF1.TxtFld1.rawValue.concat(_form1.SF1.TxtFld2.rawValue);

var myDoc = event.target;

try {

    myDoc.mailDoc({

        bUI: false,

        cTo: 'myEmail@email.com',

        cSubject: subject,

        cSubmitAs: "XML"

    });

} catch (e) {

    // exception handling...

}

I would like to modify the above to email the xml instead of the pdf.  Can anybody help? 

The reason I'm not using the submit button is because I can't figure out how to customize the subject line as I have in the above script. 

If there's a better way of doing what I need, please let me know - I'm open to suggestions.

Thanks,

J


View Entire Topic

Avatar

Avatar

Francis_Manly-E

Avatar

Francis_Manly-E

Francis_Manly-E

20-12-2012

I had a typo in the code. Try this:

event.target.submitForm({cURL:"mailto:"+""+"?&body="+"This is a test email"+"&subject="+subject+"", cSubmitAs:"PDF",cCharset:"utf-8"});