sending email as html, found script but doesnt work (strUrl notdefined)

J

.:J:.

Hey

I am trying to make a infopath 2003 form that is to be saved to
sharepoint and submitted to an external email, not able to access
infopath.

So I'd like to:
-> send the email as html
-> then save the form to sharepoint and
-> close the form.

I've found this JS script, and made it work. However something is
still not working, because suddenly it cant find strUrl. I managed to
use this code without any problems before, now I cant use it. I tried
to make that Variable strUrl, but it still fails. Some help please :)

After this code I need to submit to sharepoint 2003 and close. Any
suggestions on code/how-to to make this work right after the email has
been sent ?

Code pasted below.

Cheers
Jakob


------------------------------------------
function ManuelKnap::OnClick(eventObj)
{

// Skriv koden her
// Create an XMLHTTP object for document transport.
try
{
var objXmlHttp = new ActiveXObject("MSXML2.XMLHTTP.5.0");
//XDocument.UI.Alert("hello world 1111");
}
catch(ex)
{
XDocument.UI.Alert("Could not create MSXML2.XMLHTTP object.\r\n"
+ ex.number + " - " + ex.description);

// Return is equivalent to setting eventObj.ReturnStatus =
false,
// because no change was made to this value.
return;
}

// Post the XML document to strUrl.
objXmlHttp.open("POST", strUrl, false);
try
{
objXmlHttp.send(XDocument.DOM.xml);
//XDocument.UI.Alert("Hello world 22222");
}
catch(ex)
{
XDocument.UI.Alert("Could not post (ASP) document to " + strUrl
+ "\r\n" + ex.number + " - " + ex.description);

// Return is equivalent to setting eventObj.ReturnStatus =
false.
return;
}
// If here, the submit operation is has been successful.
eventObj.ReturnStatus = true;

}

----------------------------------------
 

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