Need an HTML link to launch a new InfoPath Form

C

CycleFitness

I need to create a link on a Web Page that will launch a new InfoPath form.
When I try to do it using a default HTML link, the users get an Insufficient
Security Privilege error. I remember reading somewhere that you have to set
the default URL to the forms library, or something to that effect, through
JavaScript?

Can someone provide me a link to the instructions on how to do this?

Thanks!
 
A

Ari4u2

Hello CycleFitness,

try the following javascript. It should solve your problem.
Just replace the path information


Example-Script.
<html>
<body>
</script>


<!-- The following line opens a link to the infopath form. //-->
<a href="javascript:WPQ1test();">Insert the link name here</a>


<script language="JavaScript">

function WPQ1test()
{
//var path = ' ' + window.location;
// var processedPath = path.substr(0,path.lastIndexOf('/'));
// alert(processedPath);


// Define location where the template should be opened from
// var strTemplate = processedPath +
"/MembershipRequests/Forms/template.xsn";
var strTemplate =
"https://workspace1.siemensvdo.com/c...L/test/VacationRequest2012/Forms/template.xsn";

// Define a specific Save Location (if needed)
// var strSaveLocation = processedPath + "/MembershipRequests";
var strSaveLocation =
"https://workspace1.siemensvdo.com/content/00002047//IOCRM_SL/test/VacationRequest2012";

var strProgID = "SharePoint.OpenXMLDocuments";
createNewDocumentWithProgID(escapeProperlyCore(strTemplate, true),
makeAbsUrl(strSaveLocation), strProgID, true);

}

</SCRIPT>
</body>
</html>


Kind regards!
 

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