Highlighted

email xml data automatically on user submit button

Replies

Highlighted

Avatar

Guest

21-07-2008

I want to email the xml data on user's click event without user's efforts.

user will get message that email is been send, Thank you.

I know following approach but using this user has to send xml file. which i don't want, I want to email on user's one click event.



Can anyone help on it.



Thanks

kdsutaria



sub= "Info: UserName:"+ xfa.form.Employee.pageSet.Pg1.firstName.rawValue+" " + xfa.form.Employee.pageSet.Pg1.lastName.rawValue;

mail="mailto:"+ agentEMailID+"?subject=" + sub;

event.target.submitForm({cURL:mail, cSubmitAs:"XML" ,cCharset:"utf-8"});

xfa.host.messageBox(" Thank you for submitting an application "+ agentEmailID +" will get back to you shortly.");
Highlighted

_Aandi_Inston_

21-07-2008

The user MUST always see and confirm the e-mail that is to be sent.

This is a fundamental security check and cannot be bypassed.



If you want a smooth, normal looking, submission you simply move to

http submission (VERY recommended, email is just a toy for testing,

not suitable for real world use).



Aandi Inston
Highlighted

Avatar

Guest

22-07-2008

We are letting user know that u have thrown email to someone and we also let user know how is going to contact them.

I tried using HTTP request but it still opening email option to send mail.



I want to do the way we do in the html page using javascript to set action event at click event and send data to specified email id.
Highlighted

_Aandi_Inston_

23-07-2008

>We are letting user know that u have thrown email to someone and we also let user know how is going to contact them.



This is good, but you cannot stop the email from opening and the user

needing to send it. This is, as I said, fundamental to security and

cannot be switched off.



>I tried using HTTP request but it still opening email option to send mail.



This suggests you did not do it right, because when you use http, no

mail is sent locally. Can you describe what you do?

>

>I want to do the way we do in the html page using javascript to set action event at click event and send data to specified email id.



HTML cannot silently send an email either.



Perhaps you could outline what sort of HTML JavaScript you use, so

that we can suggest an equivalent if there is one.





Aandi Inston
Highlighted

Avatar

Guest

23-07-2008

Here is the toy example for HTML using javascript. Instead of xml file I am sending text file to user silently. I am trying to do same thing with the static or dynamic pdf.
















function verifyPage(){



if (document.f1.FirstName.value == "abd"){

document.f1.action="mailto:adb@myemail.com";

}else{

document.f1.action ="mailto:acd@myemail.com";

}

}














FirstName:


Email:










Highlighted

Avatar

Guest

23-07-2008

I am sorry I cut and paste the code. Here is the javascript method I am calling while user's click event and dynamically deciding email address for specific type of user at runtime. I am sending text data using post method at form level.



function verifyPage(){



if (document.f1.FirstName.value == "komal"){

document.f1.action="mailto:adb@myemail.com";

}else{

document.f1.action ="mailto:adb@myemail.com";

}

}



input type="submit" name="submit" value="Submit"onclick="verifyPage()"
Highlighted

_Aandi_Inston_

23-07-2008

When I use an HTML mailto: "submit" in IE, I first get



This form is being submitted using e-mail.

Submitting this form will reveal your e-mail address to the recipient,

and will send the form data without encrypting it for privacy.

You may continue or cancel this submission.



When I click OK, a mail window opens in Outlook, ready to send.



Don't you get the same? If not, what browser do you have?



Aandi Inston