Prevent the Open/Save dialog prompt when opening DBXL document from SharePoint 2010 site - Jim Cantwell
in

InfoPath Dev

Jim Cantwell

Prevent the Open/Save dialog prompt when opening DBXL document from SharePoint 2010 site

If you have added a dataview to list DBXL documents, you will find that links will give you an open/save prompt.  This little code snippet will prevent the dialog on a SharePoint 2010 page (it may also work for SharePoint 2007, but I haven't tried it).

onclick="var b = StsOpenEnsureEx2('SharePoint.OpenXMLDocuments'); b.EditDocument2(window, '{@Link}', 'InfoPath.Document'); return false;"

Also, check out Jo-Anne's blog on using a shared javascript file to do the same that will work for SharePoint 2007:

http://www.infopathdev.com/blogs/jo-anne_alfafara/archive/2010/10/15/best-way-to-launch-forms-from-sharepoint.aspx

 

Comments

 

Jo-Anne Alfafara said:

Scenario: Whenever you want to expose your forms on a web page the tendency is to want to put a plain

January 4, 2012 10:14 PM
 

mikeng said:

I am sure this is an easy question that I do not know, but Jo-Anne mention in her posting this does not require page level editing.  Just wondering where do you put this in and using designer I am assuming?

March 27, 2012 10:41 AM
 

mikeng said:

I was trying to insert this as one of the link in the Form Library but it is a little convoluted.  Tried it with the dataview (and it works) which was easier to understand.  The full cut and paste is:

<a href="{@Link}" onclick="var b = StsOpenEnsureEx2('SharePoint.OpenXMLDocuments'); b.EditDocument2(window, '{@Link}', 'InfoPath.Document'); return false;">

<xsl:value-of select="@DocID" /></a>

March 27, 2012 1:01 PM
Copyright © 2003-2012 Qdabra Software. All rights reserved.
View our Terms of Use.