Friday, May 30, 2014

How to apply a background Image in InfoPath Form

Open your InfoPath Form. Then follow the below steps.

Page design -> Properties -> Check Use a background Picture -> Browse the picture you want to set for background and click on OK


























  

Set Image as Form background

Extract the InfoPath CAB file into a directory using the File – Extract Form Files function.
Once the files are extracted into a directory they will contain the following files. Notice the Manifest.xsf file.

Using Notepad (or another text editor) hand edit the view1.xsl to place the image within the InfoPath solution. Add the following line to the <body> element.

style="background-image:url('image001.jpg')"


 Once this is done you can right click and select “Design” on the Manifest.xsf form. This open the InfoPath form in design mode and the background image is visible. 



Wednesday, May 7, 2014

How to open Document Library Item/InfoPath Form in New Window ???

Document libraries are collections of files that you can share with team members on a Web based on Microsoft Windows SharePoint Services. 

Create document library and uploaded files in it or open existing file, its opening in the same browser. There is no inbuilt feature in SharePoint to set it to open in new window.
SharePoint uses window.location to navigate to the new link, So the link always open in current window instead of a new window.
As a solution, you can override the STSNavigate function to change the behavior; here is the code sample to override it in AllItems.aspx.

<asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
       <SharePoint:RssLink runat="server"/>
      
       <Script>
       function STSNavigate(Url){
              window.open(STSPageUrlValidation(Url),"_blank");
       }
       </Script>
</asp:content>

Instead of this you can add content editor web part and add java script code to it.